-1

I have the following HTML:

<div class='tag-enabled' data-global-id='1635' data-tag-id='8'>hello</div> <div class='tag-enabled' data-global-id='1635' data-tag-id='9'>hello</div> <div class='tag-enabled' data-global-id='1635' data-tag-id='10'>hello</div> 

I'd like to select data-global-id=1635 and data-tag-id=8 in jQuery. How would I do this?

3
  • not a duplicate of that question Commented May 9, 2014 at 23:49
  • Really? Why? How is yours any different? Commented May 9, 2014 at 23:50
  • multiple selectors - not trying to be argumentative. I'm not a jQuery expert. appreciate you read question but I didn't even get that answer when I googled the title. Commented May 9, 2014 at 23:52

1 Answer 1

3

Use two attribute selectors:

$("[data-global-id='1635'][data-tag-id='8']") 

Updated fiddle

Sign up to request clarification or add additional context in comments.

1 Comment

thx Adrift - that works well, have to wait a few minutes

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.