I have an element like
<namespace:my_name>Some <b>html</b> here!</namespace:my_name>
How do I get the jQuery element? This doesnt work:
var el = $('namespace:my_name');
alert(el.length) // = 0
I have an element like
<namespace:my_name>Some <b>html</b> here!</namespace:my_name>
How do I get the jQuery element? This doesnt work:
var el = $('namespace:my_name');
alert(el.length) // = 0
Escape the colon, it has a special meaning in CSS selectors
$('namespace\\:my_name');
Check out the jQuery documentation for selectors. You must escape the selector with two backslashes like so:
$('namespace\\:my_name');
This is what is known as a literal. There are several other characters that can also be literals, they are:
!"#$%&'()*+,./:;<=>?@[\]^`{|}~