Skip to content

get value of a custom attribute value #167

Description

@raxan

Hi

I have a custom attribute like below:

                        <select>
                            <option data-customattribute="custom attribute" value="599wa">value</option>
                        </select>

how to get value of data-customatribute?

with below snippet not work:

$('select').change(function () {
$(this).children("option").data("customattribute");
}

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions