Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New to the CF scene
    Join Date
    Sep 2012
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    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

  • #2
    Senior Coder DanInMa's Avatar
    Join Date
    Nov 2010
    Location
    Salem,Ma
    Posts
    1,577
    Thanks
    13
    Thanked 248 Times in 248 Posts
    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>';
    }


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •