I don’t know if you take suggestions seriously, but anyway…
When a visitor starts typing a search, would be great a loading icon if the ajax search is happening, since it’s common that he or she type Enter before the smart results list pops.
In fact, I’m trying myself with jQuery to addClass, so I can use :before pseudo selector to do it.
Is there any ajax trigger when the results are loaded?
// let's check search lenght
var $jq = jQuery.noConflict();
$jq('#td-header-search').on('input', function() {
if ( ($jq(this).val().length) > 0) $jq(this).addClass('letspin'); // if > 0, give class to show
else $jq(this).removeClass('letspin'); // if search is empty, remove
// BUT HOW TO CHECK IF THE RESULTS WERE LOADED TO REMOVE THE CLASS?
});
Hello,
We do not ignore suggestions We are always open to new ways to improve our theme.
We did not test this method but you can probably add a class here: https://www.screencast.com/t/ajU9mlOmm where you can store the animation. This will be added when the first request is made and then you can remove the class here: https://www.screencast.com/t/l0bAGOrC9tx once the successful response is provided
I hope this helps.
Thank you!
Sorry, but I couldn’t make it work, because the theme keeps loading the minified script. Is it auto generated? Or should I override the tagdiv_theme.min.js with the tagdiv_theme.js?