$('a').filter(function () {
return $(this).attr('area-expanded')
});
will return an array of links with attribute called 'area-expanded'
.
I need to find a link, whose attribute 'area-expanded'
value is true
(there is always one such link on the page).
I tried the following:
$('a').filter(function(){return $(this).attr('area-expanded').val() == true});
but I am getting
Uncaught TypeError: Cannot read property 'val' of undefined
I'm complete noob in JS so I am sure there is something simle I am missing. Thanks!