Domanda

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.

È stato utile?

Soluzione

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");
});
Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top