jQuery selecting a selector with namespaced element
jquery, jquery-selectors, namespaces
Solution
You're looking for:
var x= $('ns\\:text').attr('value');
return x;
Ref:
- http://docs.jquery.com/Selectors#Special_characters_in_selectors
Problem
How would I select the following in jQuery? ``` <ns:text value="my value" /> ``` I have tried the snippets below, but to no avail. Is this possible? ``` var x= $('ns:text').attr('value'); return x; ``` ``` var x= $('text').attr('value'); return x; ```