Simple Instant Search
[resolved] Amazing Plugin - Highlighting not working perfectly for me (4 posts)

  1. iftomkins
    Posted 4 years ago #

    Wow! I love this plugin. Thank you thank you!

    The only thing that's not working so well is the highlighting. Most of the time it doesn't work, and when it does, it's only on very short strings, such as "pa", and then if I kept typing "paypal" it wouldn't highlight.

    The highlighting is such a great part of it, I'd love to get it working. Any suggestions of things I should look into would be much appreciated. Oh, and I'm using it with the TwentyEleven theme.



  2. iftomkins
    Posted 4 years ago #

    Ok! I think I'm getting it. So it seems that the highlighting is case-sensitive, and also that there is no highlighting in the post titles. Is there a way to make the highlighting non-case-sensitive and turn on highlighting in the post titles?

    Again, such a cool plugin!

  3. iftomkins
    Posted 4 years ago #

    I got the highlighting in the titles happening by replacing Line 38 in instant.js with the following:

    resultHtml+='<p>'+item.content.replace(highlight, '<span class="highlight">'+highlight+'</span>')+'</p>';

    Now I'm just looking for a way to make the highlighting not case sensitive! Any thoughts?

  4. Bainternet
    Plugin Author

    Posted 4 years ago #

    its a simple JavaScript replace function http://www.w3schools.com/jsref/jsref_replace.asp

    look at the bottom.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Simple Instant Search
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic


No tags yet.