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' });
}
});
});
jQuery(window).load(function(){
why notjQuery(document).ready
? Maybe the elements you are looking for aren't yet present at page loading. Also, I don't see any.wall-outer
or.stream
element in your html – NewfangledReferenceError
. Wmell, the documentation in isotope site talks aboutgetSortData
parameter. I suppose you allready tried it. – Newfangled