Reputation: 11696
Suppose I get 3 attributes:
var uid = $("#main_container").attr("uid");
var ticker = $("#main_container").attr("ticker");
var exchange = $("#main_container").attr("exchange");
I want to get the anchor tag that matches those 3 attributes. I'm not sure how to do that with regards to where to put the quotes. Would it be:
$('a[uid='+uid+'][ticker='+ticker+'][exchange='+exchange+']')
or
$('a[uid="'+uid+'"][ticker="'+ticker+'"][exchange="'+exchange+'"]')
Upvotes: 2
Views: 60
Reputation: 388446
I think it is just that you have missed the parenthesis(used <>
instead of ()
)
$('a[uid="' + uid + '"][ticker="' + ticker + '"][exchange="' + exchange + '"]')
Upvotes: 2