Skip to content

Instantly share code, notes, and snippets.

@adatta02
Created February 8, 2013 23:50
Show Gist options
  • Save adatta02/4742945 to your computer and use it in GitHub Desktop.
Save adatta02/4742945 to your computer and use it in GitHub Desktop.
Drupal 7 Exposed Views
Drupal.behaviors.jQueryFancyExposedFilters = {
attach: function(context, settings) {
$('.fancy-exposed-filters').each(function(){
// Stop this from firing twice
if( $(this).find("form").data("fancyFilterBehaviorLoaded") ){
return true;
}
var viewElement = $(this);
$(this).find("form").ajaxComplete(function(event, xhr, settings) {
viewElement.fanyExposedFilters();
});
$(this).find("form").data("fancyFilterBehaviorLoaded", true);
});
}
};
})(jQuery);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment