I've integrated a jquery search plugin to search through isotope elements, the plugin uses regular expression to sort content, in real-time, based on the search input.
Isotope elements are updating automatically ( I'm using a wordpress plugin which retrieves data from social networks )
My question is, how can I reorder the elements after the search is performed?
L.E : I'VE SOLVED THIS BY USING OTHER PLUGIN FOR SEARCHING: Here is the code:
$(document).ready(function () {
$("#id_search").quicksearch(".dcsns-content .isotope-item", {
noResults: '#noresults',
loader: 'span.loading',
'show': function () {
$(this).addClass('quicksearch-visible');
},
'hide': function () {
$(this).removeClass('quicksearch-visible');
},
'onAfter': function () {
$('.dcsns-content .stream').isotope({ filter: '.quicksearch-visible' });
}
});
});