I would like to use custom tag into my html page and use jquery to read the text in it, something like :
<desc>Hello world</desc>
then with jquery I read the text with :
desc_text=$("desc").first().text();
On firefox and Chrome, it works, I got the 'Hello world', but not with Internet Explorer (IE 9).
After debugging, it seems that the problem comes from IE : <desc>
and </desc>
are seen as two different DOM nodes. The Hello world
is not a child node of <desc>
.
That's the reason it does not work. If I use the span
tag instead of the desc
tag : it works.
Is there a way to make it works on IE, or is that normal that IE does not interpret my custom tag like firefox / Chrome ?