开发者

How to pass the event interface?

I have following situation:

$('selector').live('click', openSite);

and open site takes the event like this

function openSite(e){
    e.preventDefault();
}

If I change my first line of code to

$('selector').live('click', function(e){

});

How do I call siteOp开发者_JS百科en within this code correctly? openSite(e) does not work.


Have you double checked your code for any typos? Here's a working example of how you've described your desired functionality.

http://jsbin.com/ijufe4

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜