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

  • Home
  • SEARCH
  • 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 6841361
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T23:57:25+00:00 2026-05-26T23:57:25+00:00

This code works in chrome/ff/ie9 however not ie8/7. http://jsfiddle.net/vDZJM/6/ Here is the JS: function

  • 0

This code works in chrome/ff/ie9 however not ie8/7.

http://jsfiddle.net/vDZJM/6/

Here is the JS:

function doDistricts(theData){
    var district="";
    var district="";
    $(theData).find("district").each(function(){

        var theDistrict = $(this);
        var districtName = theDistrict.text();
        var level = theDistrict.attr("level");
        var attr = theDistrict.attr('deleted');
        if(typeof attr !== 'undefined' && attr !== false){
            district=district+'\t\t\t<div class="district deleted">\n';
            district=district+'\t\t\t\t<header class="clearfix doNode" data-role-id="'+districtName+'" data-role-nodeLevel="'+level+'" data-role-nodeValue="'+districtName+'">\n';
            district=district+'\t\t\t\t\t<span class="arrow"></span>\n';
            district=district+'\t\t\t\t\t<img src="/img/address_list/map.png" alt="'+districtName+'" class="icon" />\n';
            district=district+'\t\t\t\t\t<span class="text">'+districtName+'</span>\n';
            district=district+'\t\t\t\t\t<a class="add" href="#">Add</a>\n';
            district=district+'\t\t\t\t</header>\n';
            district=district+'\t\t\t\t<div class="children"></div>\n';
            district=district+'\t\t\t</div>\n';
        }else{
            district=district+'\t\t\t<div class="district">\n';
            district=district+'\t\t\t\t<header class="clearfix doNode" data-role-nodeLevel="'+level+'" data-role-id="'+districtName+'" data-role-nodeValue="'+districtName+'">\n';
            district=district+'\t\t\t\t\t<span class="arrow"></span>\n';
            district=district+'\t\t\t\t\t<img src="/img/address_list/map.png" alt="'+districtName+'" class="icon" />\n';
            district=district+'\t\t\t\t\t<span class="text">'+districtName+'</span>\n';
            district=district+'\t\t\t\t\t<a class="remove" href="#">Remove</a>\n';
            district=district+'\t\t\t\t</header>\n';
            district=district+'\t\t\t\t<div class="children"></div>\n';
            district=district+'\t\t\t</div>\n';
        }

    });
    return district;
}

$('div.1').html(doDistricts($(theData)));

In a working environment with more code etc, the content is generated but the <header> tag is prematurely closed, meaning all the code that should be inside the <header> tag (<span class="arrow"> etc) actually goes outside of it. Why would this be?

  • 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-05-26T23:57:26+00:00Added an answer on May 26, 2026 at 11:57 pm

    If your document is html5 you will need to use innershiv when adding elements to the DOM

    http://jdbartlett.com/innershiv/

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

Sidebar

Related Questions

This submit button works in both Safari and Chrome but not IE9 or FF9.
Here is my site: http://smartpeopletalkfast.co.uk/jquery/basicDemo12-bugfix-3.htm It works fine on firefox, chrome, safari and ie9,
This solution does not work for IE9. I have the following code: $(document).ready(function() {
This code works in a windows forms application (it shows the preview) but not
This code works (when ControlType=dropDown then the background yellow ): <Window x:Class=TestCollapsed.Views.MainView xmlns=http://schemas.microsoft.com/winfx/2006/xaml/presentation xmlns:x=http://schemas.microsoft.com/winfx/2006/xaml
This particular page works on Firefox and Chrome. On IE9, I am getting this
I have the following code: http://jsfiddle.net/cosoroaba/nCEwv/ HTML: <div id=square> <div class=corner-wrapper> <div id=ctr></div> </div>
I got this page that works OK in Chrome, and it doesn't in IE9.
This code works (C# 3) double d; if(d == (double)(int)d) ...; Is there a
This code works fine: $result = $client->__call(optionalInfo, array( new SoapParam(..., client), new SoapParam(..., add_code))

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.