Skip to content
This repository has been archived by the owner on Feb 12, 2022. It is now read-only.

pillbox-attributes: Add attributes object to addItems method #696

Merged
merged 1 commit into from
Sep 30, 2014

Conversation

interactivellama
Copy link
Contributor

This Pull request replaces #692 for issue #679.

Allows:

$('#myPillbox1').pillbox('addItems',
    {
        text: 'item 1',
        value: 1,
        attr: {
                'cssClass': 'example-pill-class',
                'style': 'background-color: ' + backgroundColor + ';',
                'data-example-attribute': 'true'
            }
    });

amd $('#myPillbox1').pillbox('items') returns:

{
    text: 'item 1',
    value: 1,
    exampleAttribute: true
};

Text and data attributes are the only attributes returned.

@kevinparkerson
Copy link
Contributor

looks fine to me

interactivellama added a commit that referenced this pull request Sep 30, 2014
pillbox-attributes: Add attributes object to addItems method
@interactivellama interactivellama merged commit b23c07a into 3.1.0-wip Sep 30, 2014
@interactivellama interactivellama deleted the pillbox-attributes branch October 9, 2014 20:11
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants