Setup for getter and setter in a jQuery plugin -
i need illustration of simple/basic way getter , setter variables , options on custom jquery plugin. i've found illustration of in jquery ui docs:
// getter var disabled = $( ".selector" ).button( "option", "disabled" ); // setter $( ".selector" ).button( "option", "disabled", true ); looks weird, think because jquery conventions allowed bind 1 method per plugin on jquery. question is, have simple plugin this, because couldn't figure out how did in button-plugin.
i've found blog-post same issues, how did this. saving object $elem.data() makes easy open object outside world.
jquery jquery-ui plugins getter-setter
No comments:
Post a Comment