My question is how ta make a fancy box plugin or any other plugin to display system dialog box kind of effect. I want to display it like until user click on close button it should not close. But the examples what I am looking on the website or any other site The Dialog boxes closes when we click on the Overlay Area other than the wrapper Area. Does anyone have suggestion how to implement this.

有帮助吗?

解决方案

You can use jquery fancybox plugin. Available here : http://fancybox.net/

Use

helpers : { 
  overlay : {closeClick: false}
}

To get the required result. Your code should look like this

$(document).ready(function() {
 $(".fancybox").fancybox({
  closeClick  : false, // prevents closing when clicking INSIDE fancybox 
  openEffect  : 'none',
  closeEffect : 'none',
  helpers   : { 
   overlay : {closeClick: false} // prevents closing when clicking OUTSIDE fancybox 
  }
 }).trigger("click");
});
许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top