jquery - Combining Variables -
i have function:
function prodsubsection(div, sec, self) { $(".prod-feat").hide(); $(div + sec).show('slide', {direction: 'right'}, 1000); $(self) .addclass('proddetailson') .parent('li').siblings().find("a") .removeclass('proddetailson'); }
and here how execute it:
$("#product1 li.details1 a").click(function() { prodsubsection("#product1", ".over", this); return false; });
what combine div
, sec
above be:
$("#product1 .over").show('slide', {direction: 'right'}, 1000);
any idea doing wrong?
add space:
$(div + ' ' + sec)
Comments
Post a Comment