Loading...
Copy code
Close
Permalink
Close
Please tell us why you want to mark the subject as inappropriate.
(Maximum 200 characters)
Report Inappropriate
Cancel
Private Message
From :
guest
To :
Subject :
Content :
Type the characters you see in the picture below.
Send
Cancel
From :
guest
To :
Subject :
Content :
Type the characters you see in the picture below.
Send
Update
Cancel
Feedback
Email ID
Subject :
Comments :
Send
Cancel
Private Message
Type the characters you see in the picture below.
Type the characters you see in the picture below.
Attach files
Desktop
Google Docs
Each Attachment size should not exceed 1.0 MB.
Max no of attachments : 3
Loading User Profile...
guest
Response title
This is preview!
Attachments
Publish
Back to edit
Cancel
(
)
Sign In
New to this Portal? Click here to
Sign up
You can also use the below options to login
Login with Facebook
Login with Google
Login with Yahoo
jQuery
Plugins
UI
Meetups
Forum
Blog
About
Donate
All Forums
Recent Posts
Log In
Search
jQuery
Search
jQuery Forum
Move this topic
Forum :
Getting Started
Using jQuery
Using jQuery Plugins
Using jQuery UI
Developing jQuery Core
Developing jQuery Plugins
Developing jQuery UI
QUnit and Testing
About the jQuery Forum
jQuery Conferences
jQuery Mobile
Developing jQuery Mobile
Sub forum :
Move this topic
Cancel
Using jQuery
jQuery_be..
jQuery selector not working in IE7-9
in
Using jQuery
•
9 years ago
Hi
I have this simple code:
var data = $('<xml><customtag>If you see this it worked!</customtag></xml>');
alert(data.children('customtag').html() || "This time it failed");
Here is the jsfiddle:
http://jsfiddle.net/me2loveit2/bZwC9/
UPDATE: in IE use
http://jsfiddle.net/me2loveit2/bZwC9/show
I can't figure out why this wont work in older IE versions.
I tried to call
data.children() <-- without selector works in IE8
but
data.children(
'customtag'
) <--Does not work for me in IE8
Thanks for any insights!
1
Replies(3)
Godsbest
Re: jQuery selector not working in IE7-9
9 years ago
Try:
var data = $( $
.parseXML
( '<xml><customtag>If you see this it worked!</customtag></xml>' ) );
jQuery.parseXML() | jQuery API Documentation
Leave a comment on Godsbest's reply
jQuery_be..
Re: jQuery selector not working in IE7-9
9 years ago
Hey Godsbest,
Your answer helped me find the solution. I modified the code just a bit:
var data = $($.parseXML( '<xml><customtag>If you see this it worked!</customtag></xml>' ));
alert(data.find('customtag').text() + "" || "This time it failed");
I had to use .text() instead of .html(). Which I guess makes some sense since XML is not HTML?
Thanks again.
Leave a comment on jQuery_bender's reply
Godsbest
Re: jQuery selector not working in IE7-9
9 years ago
Great! Glad you had that figured out! Somehow I did not see it; had the very same issue when I first worked with XML.
Enjoy!!
Leave a comment on Godsbest's reply
Change topic type
Topic Type :
Discussions
Questions
Ideas
Problems
No of days :
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
Change topic type
Cancel
Link this topic
Provide the permalink of a topic that is related to this topic
Permalink
Save
Close
Reply to jQuery_bender's question
Top
Reply
{"z4055155":[14737000005287198,14737000005287755],"z8483411":[14737000005288206,14737000005292234]}
Statistics
3
Replies
2362
Views
1
Followers
Tags
Cancel
ie8
ie7
selector
jquery
ie9
Actions
Permalink