Modal Window with "autoOpen" set to false

Setting autoOpen to false and triggering it to open through separate calls is a better way to use modal windows.

<script>
$(document).ready(function(){
//Modal dialog
$("#register_form").dialog({
modal: true,
resizable: false,
autoOpen: false,
overlay: {
opacity: 0.5,
background: "black"
}
});
$("#register").click(function (e) {
e.preventDefault();
$("#feedback_content").dialog("open");
});

$("#register").click(function (e) {
e.preventDefault();
$("#feedback_content").dialog('close');
});
});
</script>
Advertisements
  1. Very Interesting post! Thank you for such interesting resource!PS: Sorry for my bad english, I’v just started to learn this language

  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: