hi. I have a little problem with a second part of this code:
- $('.inline_search').keyup(function (event) {
var $this = $(this);
$('.paginator').hide();
if ($this.val().length >= 3) {
$('#living-stories-dialog .list .ls').search($this.val());
$('.paginator').hide();
var search_complete = true;
}
if ((search_complete = true) && ($this.val().length < 3)) {
document.getElementById('living_stories').innerHTML = '';
return getJson();
}
});
of course function getJson is calling everytime i press a key (if number of symbols is less than 3). Data is loading about 3 seconds.
How to call this function ONCE, when number of symbols becomes less than 3?
thanks a lot