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 6195763
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T03:31:28+00:00 2026-05-24T03:31:28+00:00

I finally have jQuery AJAX down pretty well and have my website all created,

  • 0

I finally have jQuery AJAX down pretty well and have my website all created, but now I’ve arrived at the dreaded IE bugfix stage.

I am trying to do something very basic: insert an extra css for IE7 users. I have this code:

if(navigator.appVersion.indexOf("MSIE 7.0") != -1)
    {
    var ieCSS = '<link rel="stylesheet" type="text/css" href="common-ie.css" />';
    $("head").append(ieCSS);
    }

The css is not applied to the page. However, I tested it with alert($(“head”).html()) and saw that for some reason most of the quotes and the / in my inserted html are being parsed out by the browser. This is what comes out:

'<LINK rel=stylesheet type=text/css href="common-ie.css">'

Why is this happening, and how can I get around it?

  • 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-24T03:31:29+00:00Added an answer on May 24, 2026 at 3:31 am

    Just do the following instead of the javascript code your using. Insert this into the head tags like you would any of stylesheet. This will only display for IE 7

    <!--[if IE 7]>
    <link rel="stylesheet" type="text/css" href="common-ie.css" />
    <![endif]-->
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have created FormData() that work very well, because i test it using jQuery.ajax.
I have a website with ajax loaded content. Now I want to implement the
I have a jquery block that does some ajax stuff like this: $.ajax({ url:
I have tested quite a bit about making classes, now I finally discovered how
I have this snippet of code (AJAX) in jQuery. $.get('someScript.php?lat=' + clickedLatLng.lat() + '&lon='
I have a website where I make an ajax call like this: // perform
I recently decided to try jQuery 1.4, excited that I would finally have support
I have the following: Modernizr.load([ { load : '//ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js', complete : function () {
I have a form, which sends data through a Jquery Ajax Call over to
I am have a hard time learning how to use ajax and jquery to

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.