Reputation: 1009
I am trying to add a second close button to my my UI modal box in addition to the close window text to the top right of my modal box.
How can I do this?
here is my code so far
function showDialog(){
$("#example").dialog({
modal: true // Make the dialog "modal" (show an overlay beneath the dialog)
});
return false;
}
Here is the url for the modal, if you click show dialog t show the modal box http://satbulsara.com/NSJ-LOCAL-02-06/eqs1.htm
Thanks,
Sat
Upvotes: 0
Views: 1390
Reputation: 3618
Do you mean something like this?
function showDialog(){
$("#example").dialog({
modal: true // Make the dialog "modal" (show an overlay beneath the dialog)
buttons:{ "Close": function() { $(this).dialog("close"); } }
});
return false;
}
Upvotes: 0
Reputation: 785
$("#second-anchor-id").click(function(){
$("#example").dialog("close");
return false;
});
Upvotes: 1