/ Published in: jQuery

Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
<script type="text/javascript"> $(function() { // prepare second dialog $("#second_dialog").dialog({ autoOpen: false, bgiframe: true, resizable: true, height:400, width: 800, modal: true, buttons: { 'Close': function(){ $(this).dialog('close'); } } }); // register click events $("#open_new_dialog").click(function(){ $("#second_dialog").dialog('open'); }); $("#second_dialog_link").click(function(){ alert("Second dialog link"); }); // register change events $("#selection").change(function(){ alert($("#selection :selected").val()); }); }); </script> <a id="open_new_dialog"> Open Second Dialog </a> <div id="second_dialog"> <a id="second_dialog_link">Click me</a> <select id="selection"> <option value="0">first</option> <option value="1">second</option> <option value="2">third</option> </select> </div>
Comments
