Created
February 8, 2013 23:50
-
-
Save adatta02/4742945 to your computer and use it in GitHub Desktop.
Drupal 7 Exposed Views
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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