Closed
Description
When a plugin instance is created, it is stored on the original DOM element using jQuery.data, with the plugin name as the key
That vaguely suggests that the plugin name is used as the key, and one may wonder whether the namespace is included, and how it is joined to the plugin name
The code example seems to clear any possible dubt:
var bar = $( "<div />") .appendTo( "body" ) .progressbar() .data( "progressbar" );
The namespace is omitted. And that's wrong. That will never work.
The example was so clear and unambiguous (but wrong) that it led me to think that there was an actual bug in the software, which I wrongly reported.
http://bugs.jqueryui.com/ticket/10123#comment:2
The namespace is infact needed, and it must be joined to the plugin name with a hyphen.
That should be stated explicitely, and the example code fixed:
var bar = $( "<div />")
.appendTo( "body" )
.progressbar()
.data( "nmk-progressbar" );
Metadata
Metadata
Assignees
Labels
No labels