Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7913249
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T13:47:51+00:00 2026-06-03T13:47:51+00:00

I have some jQuery code which works great in Firefox and Chrome, but does

  • 0

I have some jQuery code which works great in Firefox and Chrome, but does not work in Internet Explorer 8 (haven’t tested in other IE versions). Internet Explorer is running in standards mode.

The intent of the code below is to create a new list item on the fly. Its content is set to that of a form that is inside of a hidden section element. What happens when using IE is that the section element becomes unhidden and the li is added to the list, but is empty.

What’s wrong with this code in IE?

$('ul.elementlist').on('click', '.add-element-icon', function (event) {
    var plusIcon = $(this);
    plusIcon.hide();

    var parentLi = plusIcon.parent();

    var before = parentLi.attr('id');

    var after = parentLi.next().attr('id');
    if (typeof after === "undefined") {
        after = 'none';
    }

    var li = $('<li class="element">').html($('section.add-element').html());
    $('input[name="elementBefore"]', li).val(before);
    $('input[name="elementAfter"]', li).val(after);
    li.insertAfter(parentLi);
});
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T13:47:53+00:00Added an answer on June 3, 2026 at 1:47 pm

    Since you are using the section element I would guess that you are making use of other HTML5 elements and are using an HTML5 doctype: <!DOCTYPE html>. Under these assumptions I would assert you need to do a few things to make your markup “IE friendly.”

    First ensure that IE truly is running in IE8 Standards compatibility mode* by adding the following meta tag to your head section:

    <meta http-equiv="x-ua-compatible" content="IE=8"/>
    

    Immediately following the standards compatibility setting add a reference to html5shiv which is a JavaScript shiv for IE to recognize and style HTML5 elements:

    <!--[if IE]>
        <script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script>
    <![endif]-->
    

    Between these two changes you should be good to go. After the changes force IE to do a full resource refresh by pressing CTRL + F5.

    * If this is a new web site you may want to consider using IE=edge as it tells Internet Explorer to use the highest mode available.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This is my first jQuery script, which works great in Firefox and Chrome, but
I'm trying to use some jQuery code for Ajax which works well in Firefox
I have some jquery code which I am trying to translate to YUI. I
I have some jQuery code, which attempts to show the first 6 divs on
i have done some code in jquery but where i commented in this bellow
I have some jQuery code which retrieves content using getJSON(). There are n JSON
I have some code which uses a selector in a loop. This works: document.getElementById(new_grouping_+i).value
//UPDATE// I found some code to do paging which I have modified to work
I have this little piece of jQuery/jqModal code which works fine. However, I am
I have a jQuery code which works perfect on desktop browsers; $(span#checkbox_err).mouseout(function () {

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.