Skip to content

get value of a custom attribute value #167

@raxan

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");
}

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