javascript - Multiple classes in one jquery initialization -
i'm using plugin
http://www.jqueryscript.net/layout/responsive-equal-height-plugin-with-jquery-responsibleheight.html
but don't know how make "child" multiple classes.
here's code initialize plugin. here used plugin? copy , paste code , put different class under "child" bit redundant. there way can lessen code without using same code on , on again?
thanks!
//initialise plugin $('.item-container div').responsibleheight({ delay: 0, child: '.filter', widths: [ [1300, 10], [1000, 8], [700, 4], [40, 2], [0, 1] ] }); //destroy plugin, remove heights , stop working on resize $('.destroy').click(function(){ $('.item-container div').responsibleheight('destroy') }); //reinitialise plugin $('.reinit').click(function(){ $('.item-container div').responsibleheight('reinit') });
do want select items multiple classes or multiple items various classes ?
if code looks this:
child: '.filter',
// may not work - plugin allows select 1 child
if want select childs 1 of few classes, code this: (simply separate classes using comma)
child: '.filter, .class2, .class3',
or if want select items have more 1 class: (list classes 1 after another)
child: '.filter.class2.class3',
hope :)
Comments
Post a Comment