tags:

views:

16

answers:

1

Hello I create jquery ui dialogs dynamically and would like to close them all at once. What would be the correct syntax to do so ?

They all use the same class name called 'viewuser' and all have different ids

Thank you

A: 
$('.viewuser').dialog('close');
casablanca
problem is that jquery ui dialog adds its own classes to the viewuser class how do I get a partial match on viewuser - if an element has a 3 different classes applied to it example : viewuser ui-dialog-content ui-dialog .. how do I get a partail match on viewuser ? Would what you wrote in your anwer work if the element has more than 1 class applied to it ?
GX
Yes it doesn't matter if the element has other classes, `$('.viewuser')` will still match any element that has at least the "viewuser" class. Here's an example on [JSBin](http://jsbin.com/iqafa4/).
casablanca
perfect - thanks
GX