jQuery dialog: Alternate close button -


How do I define an optional close button for the jQuery dialog?

I need an anchor with the class to close the "open popup-close" dialog.

The simplest is the best!

This should do the trick:

  & lt; Div id = "dialog" title = "dialog title" style = "border: 1px solid red; position: full; display: none" & gt; I am in a dialog & lt; Span class = "popup-close" & gt; turn me off! & Lt; / Span & gt; & Lt; / Div & gt; & Lt; An id = "open-dialog-button" href = "#" & gt; Open Dialog & lt; / A & gt; Click  

and your jQuery ...

  $ ("# dialogue" .popup-close ") (function () {$ ( "#dialog"). Communication ("Closed");}); Click on $ ("# open-dialog-button") (function () {$ ("# dialog"). Dialog ({// close the escape and default close button for this dialog.OnEscape: false, open: Function (Event, UI) {$ (".ui-dialog-titlebar-close", $ (this) .Parent ()). Hide ();}});});  

Comments

Popular posts from this blog

Eclipse CDT variable colors in editor -

AJAX doesn't send POST query -

wpf - Custom Message Box Advice -