jQuery live search plugin is showing too many results at the same time
<p>This is a jQuery plugin that is used for Live Search. It's simple. You type in the search box, and while you do that, the plugin shows you the results in real time.</p>

<p>The problem is that if I type "item" in the Fiddle, it will find and mark (Highlight) all the words "item". I would like it to mark only the first word it finds.</p>

<p>The following picture shows what's wrong:</p>

<p><a href="https://i.stack.imgur.com/mL0Ss.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/mL0Ss.jpg" alt="enter image description here"></a></p>

<p>And the following picture shows the result that I need to achieve:</p>

<p><a href="https://i.stack.imgur.com/j8vxh.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/j8vxh.jpg" alt="enter image description here"></a></p>

<p>As you can see, in one picture it shows all words "item", but in the second picture it only shows the first result "item".</p>

<p><strong>You can be able to test it in the <a href="http://jsfiddle.net/matheussousuke/6Lz2zsmm/3/" rel="nofollow noreferrer">JSFIDDLE</a></strong></p>

<p>I need to achieve that because I'm going to need to put a previous and next button later. In other words, I'm just trying to mimic the <code>Control + F</code> function from the browser.
HTML CODE:</p>

<pre><code>&lt;input id="search" name="search" placeholder="Start typing here" type="text" data-list=".list"&gt;
&lt;ul class="list"&gt;
  &lt;li&gt;item 1&lt;/li&gt;
  &lt;li&gt;item 2&lt;/li&gt;
  &lt;li&gt;hasta la vista baby&lt;/li&gt;
  &lt;li&gt;&lt;a href="#"&gt;item 2&lt;/a&gt;&lt;/li&gt;


  &lt;div&gt;

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer sed nulla magna. Vivamus dictum, metus ut lobortis sollicitudin, nunc elit ultricies felis, sit amet lobortis tellus mauris id purus. Cras eget tellus bibendum, gravida dolor eget, porta elit. Nullam sed porta odio, vitae fermentum nunc. Nulla consequat enim id mauris posuere placerat. Pellentesque leo risus, maximus sed vehicula a, fermentum ultrices turpis. Maecenas lectus neque, scelerisque non urna quis, varius porta metus. Mauris rutrum lectus enim, eu semper ante porta ac.

 &lt;/div&gt; 
</code></pre>

<p>
 </p>

<p>JQUERY:</p>

<pre><code>/**
 * HideSeek jQuery plugin
 *
 * @copyright Copyright 2015, Dimitris Krestos
 * @license   Apache License, Version 2.0 (http://www.opensource.org/licenses/apache2.0.php)
 * @link      http://vdw.staytuned.gr
 * @version   v0.7.1
 *
 * Dependencies are include in minified versions at the bottom:
 * 1. Highlight v4 by Johann Burkard
 *
 */

  /* Sample html structure

  &lt;input name="search" placeholder="Start typing here" type="text" data-list=".list"&gt;
  &lt;ul class="list"&gt;
    &lt;li&gt;item 1&lt;/li&gt;
    &lt;li&gt;...&lt;/li&gt;
    &lt;li&gt;&lt;a href="#"&gt;item 2&lt;/a&gt;&lt;/li&gt;
  &lt;/ul&gt;

  or

  &lt;input name="search" placeholder="Start typing here" type="text" data-list=".list"&gt;
  &lt;div class="list"&gt;
    &lt;span&gt;item 1&lt;/span&gt;
    &lt;span&gt;...&lt;/span&gt;
    &lt;span&gt;item 2&lt;/span&gt;
  &lt;/div&gt;

  or any similar structure...

  */

!function(e){"use strict";e.fn.hideseek=function(t){var s={list:

".hideseek-data",nodata:"",attribute:"text",highlight:!1,ignore:"",headers:"",navigation:!1,ignore_accents:!1,hidden_mode:!1,min_chars:1},t=e.extend(s,t);return this.each(function(){var s=e(this);s.opts=[],e.map(["list","nodata","attribute","highlight","ignore","headers","navigation","ignore_accents","hidden_mode","min_chars"],

                                                                                                                                                                                                                     function(e){s.opts[e]=s.data(e)||t[e]}),s.opts.headers&amp;&amp;(s.opts.ignore+=s.opts.ignore?", "+s.opts.headers:s.opts.headers);var i=e(s.opts.list);s.opts.navigation&amp;&amp;s.attr("autocomplete","off"),s.opts.hidden_mode&amp;&amp;i.children().hide(),s.keyup(function(t){function o(e){return e.children(".selected:visible")}function n(e){return o(e).prevAll(":visible:first")}function a(e){return o(e).nextAll(":visible:first")}if(38!=t.keyCode&amp;&amp;40!=t.keyCode&amp;&amp;13!=t.keyCode&amp;&amp;(8!=t.keyCode?s.val().length&gt;=s.opts.min_chars:!0)){var r=s.val().toLowerCase();i.children(s.opts.ignore.trim()?":not("+s.opts.ignore+")":"").removeClass("selected").each(function(){var t=("text"!=s.opts.attribute?e(this).attr(s.opts.attribute)||"":e(this).text()).toLowerCase(),i=-1==t.removeAccents(s.opts.ignore_accents).indexOf(r)||r===(s.opts.hidden_mode?"":!1);i?(e(this)

    /* Prevents results from being filtered - Default value: .hidden()*/
    .show(),s.


                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     trigger("_after_each")):(s.opts.highlight?e(this).removeHighlight().highlight(r).show():e(this).show(),s.trigger("_after_each"))}),s.opts.nodata&amp;&amp;(i.find(".no-results").remove(),i.children(':not([style*="display: none"])').length||i.children().first().clone().removeHighlight().addClass("no-results").show().prependTo(s.opts.list).text(s.opts.nodata)),s.opts.headers&amp;&amp;e(s.opts.headers,i).each(function(){e(this).nextUntil(s.opts.headers).not('[style*="display: none"],'+s.opts.ignore).length?e(this).show():e(this).hide()}),s.trigger("_after")}s.opts.navigation&amp;&amp;(38==t.keyCode?o(i).length?(n(i).addClass("selected"),o(i).last().removeClass("selected")):i.children(":visible").last().addClass("selected"):40==t.keyCode?o(i).length?(a(i).addClass("selected"),o(i).first().removeClass("selected")):i.children(":visible").first().addClass("selected"):13==t.keyCode&amp;&amp;(o(i).find("a").length?document.location=o(i).find("a").attr("href"):s.val(o(i).text())))})})},e(document).ready(function(){e('[data-toggle="hideseek"]').hideseek()})}(jQuery);

/*

highlight v4

Highlights arbitrary terms.

&lt;http://johannburkard.de/blog/programming/javascript/highlight-javascript-text-higlighting-jquery-plugin.html&gt;

MIT license.

Johann Burkard
&lt;http://johannburkard.de&gt;
&lt;mailto:jb@eaio.com&gt;

*/
jQuery.fn.highlight=function(t){function e(t,i){var n=0;if(3==t.nodeType){var a=t.data.removeAccents(true).toUpperCase().indexOf(i);if(a&gt;=0){var s=document.createElement("mark");s.className="highlight";var r=t.splitText(a);r.splitText(i.length);var o=r.cloneNode(!0);s.appendChild(o),r.parentNode.replaceChild(s,r),n=1}}else if(1==t.nodeType&amp;&amp;t.childNodes&amp;&amp;!/(script|style)/i.test(t.tagName))for(var h=0;h&lt;t.childNodes.length;++h)h+=e(t.childNodes[h],i);return n}return this.length&amp;&amp;t&amp;&amp;t.length?this.each(function(){e(this,t.toUpperCase())}):this},jQuery.fn.removeHighlight=function(){return this.find("mark.highlight").each(function(){with(this.parentNode.firstChild.nodeName,this.parentNode)replaceChild(this.firstChild,this),normalize()}).end()};

// Ignore accents
String.prototype.removeAccents=function(e){return e?this.replace(/[áàãâä]/gi,"a").replace(/[éè¨ê]/gi,"e").replace(/[íìïî]/gi,"i").replace(/[óòöôõ]/gi,"o").replace(/[úùüû]/gi,"u").replace(/[ç]/gi,"c").replace(/[ñ]/gi,"n"):this};







$(document).ready(function() {
  $('#search').hideseek({
      list:           '.hideseek-data',
      nodata:         'Nada encontrado',
      attribute:      'text',
      highlight:      true,
      ignore:         '',
      hidden_mode: false,
      navigation:     false,
      ignore_accents: false
});
});
</code></pre>