I\'m working on a pre-written module for a site, and I need to target an element with the id test:two. Now, this element has a colon in it, so jQuery is presuma
test:two
Try using an attribute selector
$(document).ready(function() { $('div[id="test:two"]').each(function() { alert($(this).text()); }); });
Fiddle: http://jsfiddle.net/zbX8K/2/