Need to know if a jQuery UI Widget has been applied to a DOM object

后端 未结 5 1880
我寻月下人不归
我寻月下人不归 2021-02-18 12:52

I\'m using jQuery and have some interactions with a jQuery UI where I need to get options. However there\'s a possibility that the jQuery UI function has not been applied yet t

5条回答
  •  清歌不尽
    2021-02-18 13:34

    The DOM object will get an extra CSS class appended to it: "ui-progressbar". If you View Source on http://docs.jquery.com/UI/Progressbar then you can see a div with id=progressbar and nothing more, but if you use Firebug and click the element you can see it has a few more classed added.

    Edited: I think that @jamiebarrow's solution is the more correct one here.

提交回复
热议问题