简体   繁体   English

最新的jqModal版本:“实时”链接触发器将不起作用

[英]Latest jqModal release: “live” link triggers won't work

With the latest jqModal release (+r14), I'm having an issue with the new feature of live links. 在最新的jqModal版本(+ r14)中,实时链接的新功能出现了问题。 Whenever the live-loaded trigger link is clicked on, it redirects to the HREF instead of loading it via AJAX. 每当单击实时加载的触发链接时,它都会重定向到HREF,而不是通过AJAX加载它。 How can I make it behave normally? 如何使它正常运行?

I've searched around and other people seem to have this issue, but it's gone unresolved. 我到处搜寻,其他人似乎也有这个问题,但尚未解决。

$('a.modal-product-trigger').live('click', function(){
    $('#modal-product').jqmShow(this);
});

I'm not particularly familiar with jqModal, but try canceling the event: 我对jqModal并不是特别熟悉,但是请尝试取消该事件:

$('a.modal-product-trigger').live('click', function(){
        $('#modal-product').jqmShow(this);
        return false;   
});

If you don't do this the event will go through with its default action, which is to act as a regular link. 如果您不这样做,则事件将通过其默认操作(作为常规链接)进行。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM