0

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')
Karan Bhatia
  • 807
  • 1
  • 8
  • 16

0 Answers0