vendredi 23 août 2019

Jquery .attr returning undefined [duplicate]

Jquery function .attr returns undefined for the below code snippet.

<a class="dropdown-item active" href="#" sort-data="A-Z">
<i class="material-icons">check</i>A-Z</a>

What I am trying is this-

$('dropdown-item active').attr('sort-data')

What I've also tried is this -

$('.dropdown-item active').attr('sort-data')




Aucun commentaire:

Enregistrer un commentaire