jQuery Tools alert works once (but only once)

可紊 提交于 2019-11-30 04:59:55

Define the dialog and set load to false (disabling auto-load of the dialog):

$('#the_alert').overlay({
    mask: {
        color: '#cccccc',
        loadSpeed: 200,
        opacity: 0.9
    },
    closeOnClick: false,
    load: false
});

Then in your handler that shows the dialog, call the load api method:

$("#show").click(function() {
    $("#the_alert").data("overlay").load();
});

(Assigns a click event to an element with id of show which shows the overlay)

Working example here: http://jsfiddle.net/andrewwhitaker/Vqqe6/

I don't believe you're able to define more than one overlay on a particular element, which was causing your problem.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!