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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T02:31:14+00:00 2026-05-27T02:31:14+00:00

I have a list of div elements created with javascript on the page that

  • 0

I have a list of div elements created with javascript on the page that have the format:

<div id="UniqueID" class="request">
    <div class="request_main"></div> //VISIBLE
    <div class="request_info"></div> //HIDDEN
</div>

On clicking a div, the jQuery click listener handles a click event on the request_main element and searches the parent div for the request_info div. It then shows the request_info div if it’s not already visible.

$(".request_main").live('click', function() {       
    $(".nrl").removeClass('blue').addClass('grey');                 
    if ($(this).parent().find(".request_info").css('display') == 'none') {
        $(".request_info").hide();  
        $(this).parent().find(".request_info").stop(false,true).show("slide", {direction:"up"}, 300, function(){});
        $(this).find(".nrl").removeClass('grey').addClass('blue');
        $(".links").removeClass('white').addClass('grey');
        $(".links").css('background-color','white');
        $(this).find(".links").removeClass('grey').addClass('white');
        $(this).find(".links").css('background-color','#1B75BB');
    }           
});

In Firefox, Safari, Chrome and even IE9 this works fine. In IE8 however, the function works only on divs that haven’t been clicked before e.g. Click on UniqueID_1 -> request_info displays. Click on UniqueID_2 -> request_info displays. Click on UniqueID_1 a second time -> nothing happens.

alert($(this).parent().find(".request_info").css('display'));

This statement returns none and block on each click with the working browsers. In IE8 this returns none and block the first time, then undefined after that (when clicking on the same div). This happens even if I explicitly set the values for the div in the function to none and block after the show and hide calls.

  • 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-27T02:31:15+00:00Added an answer on May 27, 2026 at 2:31 am

    Try with the following code:

    $(".request_main").live('click', function(e) {
      e.stopPropagation();
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a page ItemList that shows a list of items using div's. After
I have a list of dynamically generated div-tags with a class-attribute but no id.
(The target browser is IE8) I have a div that contains a list of
If I have a drop down list as follows <div class=editor-label> <%= Html.DropDownListFor(model =>
I have a base.html template that contains a list of links. Example: <div id=sidebar1>
I have a list of div elements: var list = $('.divelement').get(); I want to
I have created an unordered list inside a div which is absolutely positioned. When
I have a list of images within a div tag with the id sIMG
I have a list with two <div> s in every <li> and I want
I have a list of <p> inside a <div id=someDiv> I use this 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.