source: src/django_gheat/website/static/jquery.chained.mini.js@ 9237

Last change on this file since 9237 was 9237, checked in by rick, 13 years ago

Disabled some code to show example filters.

File size: 776 bytes
Line 
1
2(function($){$.fn.chained=function(parent_selector,options){return this.each(function(){var self=this;var backup=$(self).clone();$(parent_selector).each(function(){$(this).bind("change",function(){$(self).html($(backup).html());var selected="";$(parent_selector).each(function(){selected+="\\"+$(":selected",this).val();});selected=selected.substr(1);var first=$(parent_selector).first();var selected_first=$(":selected",first).val();$("option",self).each(function(){if(!$(this).hasClass(selected)&&!$(this).hasClass(selected_first)&&$(this).val()!==""){$(this).remove();}});if(1==$("option",self).size()&&$(self).val()==""){$(self).attr("disabled","disabled");}else{$(self).removeAttr("disabled");}});$(this).trigger("change");});});};$.fn.chainedTo=$.fn.chained;})(jQuery);
Note: See TracBrowser for help on using the repository browser.