Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $.fn.dyna_select = function (options){
- init: function (options) {
- parent_group = $(this).data('dyna-select');
- dyna_show_class = $(this).val().toLowerCase().split(' ').join('_');
- $(options.parent).find("[data-dyna-parent='"+parent_group+"']").each(function(){
- if($(this).hasClass(dyna_show_class)) {
- $(this).removeClass('hide');
- } else {
- $(this).addClass('hide');
- }
- });
- }
- $(this).on('change', function () {
- this.init(options);
- });
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement