highchartsdude
highchartsdude

Reputation: 571

How do I close the other modal dialog box?

I have the following example http://jsfiddle.net/zidski/Mz9QU/1/

If you click on Link2 and then Link1 I want Link2 box to close.

Can anyone help?

Upvotes: 0

Views: 98

Answers (2)

danwellman
danwellman

Reputation: 9253

I forked your fiddle

The fix just involves calling your close_model() function before the show_modal() function to close any other open modals before opening the new one :)

Upvotes: 3

Derek
Derek

Reputation: 4931

Why not just call close_modal(); as soon as any modal box is opened? This would hide any open dialog/modal boxes whether they're open or not but would create minimal overhead (probably less than putting a check to see if any are open).

Upvotes: 1

Related Questions