SyntaxFix
Write A Post
Hire A Developer
Questions
I would probably use $('.mydiv').is('#foo'); That said if you know the Id why wouldnt you just apply it to the selector in the first place?
$('.mydiv').is('#foo');