开发者

Get selector used to init plugin within plugin

How to get the selector used to initialise a plugin within the plugin?

My first idea was to use $(this).attr('class'); but that would retrieve all classes set.

edit

$('.thisSelector').pluginName();

How can I retrieve this select开发者_如何转开发or within the plugin?


$(this).selector see api docs


Actually, within a plugin, there is no need to wrap "this" in a jQuery function, so it's just

this.selector

Sorry I don't have enough reputation to add this as a comment.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜