Jquery CSS Psuedo Element :ui-dialog

Go To StackoverFlow.com

1

From what I can see ui:dialog isnt a standard psuedo css element, so I was wondering what the following line achieved:

$j("#inline:ui-dialog").dialog("destroy");

I could find a div with id "inline" but where does the ui-dialog come from ?

2012-04-04 17:02
by StevieB
Probably from: http://jqueryui.com/demos/dialog/ I'm right or I missed something - Igor Escobar 2012-04-04 17:04
Where did you get that code from - j08691 2012-04-04 17:20


1

$.widget() provides a pseudo-selector for your widget automatically. The pseudo-selector is created from the jQuerySubclass, the namespace and the call name.

$.widget('ui.mywidget',{});
// same like this
$.widget('jQuery.ui.mywidget',{});

The associated speudo-selector is:

':ui-mywidget'

Which means every widget created using $.widget() automatically provides a pseudo selector.

Here is a reference.

2012-04-04 17:21
by The Alpha


0

The jquery UI widget factory has automatic pseudo selector generation for all widgets.

2012-04-04 17:11
by miguel_ibero
Ads