我是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