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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T21:51:01+00:00 2026-05-18T21:51:01+00:00

I am retriving this content from ajax <div id=content> click on image to close<img

  • 0

I am retriving this content from ajax

<div id="content">
click on image to close<img id="img_id">
</div> 

jQuery code to close div:

$("#img_id").live('click',function(){
    $("#content").slideUp('fast');
});

Once I click on image div closes. But in IE6 nothing happens. I don’t know why IE6 doesn’t take live click event, or if the problem is with image id.

Once image clicked (live click event not triggered in IE6) What would be the reason?

  • 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-18T21:51:01+00:00Added an answer on May 18, 2026 at 9:51 pm

    It works in simple tests (see below), even with IE6, so we’re looking at something specific to your page.

    Thoughts:

    1) IE, and particularly IE6, has issues mixing together namespaces, do you have anything on the page with the name “content” or “img_id” other than the above? Any global variables? The name attribute on a field?

    2) Are you absolutely sure the code setting up the live handler is being executed on IE? IE has issues with some syntax quirks that some other browsers don’t have (for instance, trailing commas in object literals), so you need to be sure the script is parsing correctly.


    Simple test, with no DOCTYPE (that doesn’t seem to make a difference one way or the other), no HTML5 shim, etc.:

    HTML:

    <html>
    <head>
    <script class="jsbin" src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>
    <meta charset=utf-8 />
    <title>Test Page</title>
    </head>
    <body>
      <div id='container'></div>
    </body>
    </html>​
    

    JavaScript:

    jQuery(function($) {
    
      display("Setting live handler");
      $("#img_id").live('click',function(){
        $("#content").slideUp('fast');
      });
    
      display("Loading content from http://jsbin.com/ihuki3...");
      $("#container").load("http://jsbin.com/ihuki3", function(xhr, statusText) {
        display("Done loading, status = " + statusText);
      });
    
      function display(msg) {
        $("<p/>").html(msg).appendTo(document.body);
      }
    });​
    

    Live copy * Live copy with DOCTYPE

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

Sidebar

Related Questions

I am trying to show an image by ajax-jquery. this is part of my
I have a div that is receiving content from an ajax call. Right now
This Ajax is not retrieving any information from its' PHP file as it should,
I wrote a Delphi function retrieving a web page from another application. This works
I currently have a JS function that allows me to load partial content from
i am receiving a piece of plain html from an ajax request. <h1>Title</h1> <div>
I'm trying to get data from a resource with jquery's ajax and then I
I want to return an array from a php function to my ajax call.
I'm using a ajax script to load content from other pages, without having to
I need help in converting a file received from a jquery ajax to byte

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.