我需要通过2个变量(Nextimage软件,PREVIMAGE)在这个函数jQuery参数功能
$("a.lightbox").click(function abc(e) {
var nextimage = $(this).parent().next().children('a').attr('href');
var previmage = $(this).parent().prev().children('a').attr('href');
return nextimage;
return previmage;
});
他们应该被传递给这个函数像
function nextimage(){
$('<img src="nextimage"/>')
}
之间传递任何帮助将大大赞赏
什么是你的问题?我不明白。 – 2011-04-08 18:44:52
我需要从函数abc()传递2个变量到函数nextimage() – George 2011-04-08 18:46:30
这没有意义。你如何从点击事件返回一些东西?谁会捕获返回的值?为什么不直接从处理程序中调用'nextimage()'? – 2011-04-08 18:49:09