Closed barcar closed 8 years ago
I figured out that the attributes listed in the documentation are just examples - you can use any attribute. So I added a "data-keywords" (HTML5) attribute to my items and then included the following code to combine, keywords, title and text into this attribute before initialising HideSeek:
// Append Text and Title to HideSeek search keywords to all FormsItem objects
$('.FormsItem').each(function(index) { $(this).attr('data-keywords', $.trim($(this).attr('data-keywords')) + ' ' + $.trim($(this).text()) + ' ' + $.trim($(this).attr('data-original-title')) );
Combining this with option:
attribute: 'data=keywords'
which tells HideSeek to use the combined field did the trick.
Is it possible to search multiple attributes? Text, title? Or to have a custom hidden data attribute which can be searched?