Skip to content

Data objects on binded elements #7

@bcinarli

Description

@bcinarli

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions