Go Back   CodingForums.com > :: Client side development > JavaScript programming

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 09-11-2012, 04:49 PM   PM User | #1
gsalini
New to the CF scene

 
Join Date: Sep 2012
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
gsalini is an unknown quantity at this point
issue: firstElementChild --convert to jquery or other

Hi,

can someone please provide a way the following will work in IE7:

objects_array[i].firstElementChild.firstElementChild.innerHTML = '<sup>(' + (i+1) + ')</sup>';

it works in chrome and other browsers but not internet explorer
gsalini is offline   Reply With Quote
Old 09-11-2012, 07:04 PM   PM User | #2
DanInMa
Senior Coder

 
DanInMa's Avatar
 
Join Date: Nov 2010
Location: Salem,Ma
Posts: 1,307
Thanks: 12
Thanked 204 Times in 204 Posts
DanInMa is on a distinguished road
this is a shot in the dark :


Code:
if((document.all)&&(navigator.appVersion.indexOf(”MSIE 7.”)!=-1)){
objects_array[i].children[0].children[0].innerHTML = '<sup>(' + (i+1) + ')</sup>';
} else {
objects_array[i].firstElementChild.firstElementChild.innerHTML = '<sup>(' + (i+1) + ')</sup>';
}
__________________
- Firebug is a web developers best friend! - Learn it, Love it, use it!
- Validate your code! - JQ/JS troubleshooting
- Using jQuery with Other Libraries - Jslint for Jquery/other JS library users
DanInMa is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 10:47 PM.


Advertisement
Log in to turn off these ads.