How do I select elements based on all their content in jQuery?
Posted
by Kev
on Stack Overflow
See other posts from Stack Overflow
or by Kev
Published on 2010-03-25T13:12:39Z
Indexed on
2010/03/25
13:23 UTC
Read the original article
Hit count: 315
jQuery
|JavaScript
I have a series of <div/>
's as follows:
<div>.co.uk</div>
<div>.com</div>
<div>.gb.com</div>
<div>.uk.com</div>
<div>.net</div>
How do I select just the divs containing .co.uk
, .com
, .net
.
If I use:
$('div:contains(".co.uk"), div:contains(".com"), div:contains(".net")`)
This causes the .gb.com
and .uk.com
divs to be selected as well.
© Stack Overflow or respective owner