Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Data objects on binded elements #7

Open
bcinarli opened this issue Jul 14, 2015 · 0 comments
Open

Data objects on binded elements #7

bcinarli opened this issue Jul 14, 2015 · 0 comments

Comments

@bcinarli
Copy link
Member

For general usage, controlling and modifying elements we add some data values when a plugin binded.

Rocket Data

// data name uxRocket

uxRocket: {
    "hasWrapper": true, // when plugin wraps the element, set to true otherwise false
    "wrapper": "uxitd-clear-wrap", 
    "ready": "uxitd-clear-ready",
    "selected": selector, // the jQuery selector
    "options": options // plugin options
}

Plugin Data
Currently we are storing merged plugin options to element

var opts = $.extend({}, defaults, options, $(el).data(), {'selector': selector});

$el.data("uxClear", opts);

Note that: Plugin defaults can also modified both from options object while plugin binding or form data attributes on the element.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

No branches or pull requests

1 participant