簡體   English   中英

jQuery bpopup顯示彈出窗口,其中我的鏈接代碼是href

[英]jquery bpopup show popup where my link code is a href

我想知道是否有可能讓我的bPopup顯示在觸發彈出窗口的每個鏈接下方?

我的js:

;(function($) {
    $(function() {
        $('.notesbutton').bind('click', function(e) {
            e.preventDefault();
            $('#notesdisplay').bPopup({
            position: [1,1]
            });
        });
    });
})(jQuery);

HTML:

<td align=\"center\"><a href=\"#\" class=\"notesbutton\"><b>Yes</b></a></td>
<div id=\"notesdisplay\">$notes</div>

如果該職位接受XY訪問,那么您應該能夠做到這一點。

;(function($) {
    $(function() {
        $('.notesbutton').bind('click', function(event) {
            event.preventDefault();
            $('#notesdisplay').bPopup({
               position: [event.pageX, event.pageY]
            });
        });
    });
})(jQuery);

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM