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

Popular posts from this blog

linux - Using a Cron Job to check if my mod_wsgi / apache server is running and restart -

actionscript 3 - TweenLite does not work with object -

jQuery Ajax Render Fragments OR Whole Page -