我是jQuery的新手,但我希望有人能夠幫助我。我已經搜索了這個論壇(和其他人),但一直未能找到我可以開展工作的答案。發送變量到JQuery函數
我有這樣一個鏈接:
<a href="#">
和jQuery腳本:
$("div.show_dialogbox").click(function(){
$("div#dialogboxwraper").animate({
height: "400px"
}, "slow")
.animate({
height: "200px"
}, "slow");
});
我希望能夠發送一個變量的聯繫,並用它在腳本這樣的高度:
<a href="#" OnClick="variable(200)">
$("div.show_dialogbox").click(function(variable){
$("div#dialogboxwraper").animate({
height: variable+200+"px"
}, "slow")
.animate({
height: variable+"px"
}, "slow");
});
請更正您的語法。 – 2010-11-03 19:01:38
Soory ...我的誦讀困難和英語不是我的母語 – 2010-11-03 19:46:40