Jump to content

jquery help: find children of ..


everisk

Recommended Posts

I have a code like

 

//we search trough the content for the visible div and we fade it out

$("#container_upper_bg").find("div:visible").fadeOut("fast", function(){

 

//once the fade out is completed, we start to fade in the right div

$("#container_upper_bg").find("#"+idToLoad[0]).fadeIn();  <--- Here I want find #idToLoad and its children, then fadeIn .. How do I do that?

 

Thank you in advance!

 

 

Link to comment
Share on other sites

idToLoad is part of container_upper_bg, but container_upper_bg contains a few others div, including idToLoad. However, idToLoad might contain its own children (div) and I only want idToLoad and its children to fadeIn .. not all children of container_upper_bg. HTML is something like

 

<div id="container_upper_bg">

<div id="home">

        <div id="container_upper_center">

            <div id="upper_left">

                  Some information

            </div>

            <div id="upper_right"><img src="images/home_pic.jpg"></div>

        </div> <!-- end container_upper_center -->

    </div>

   

    <div id="service" style="display:none">

        Some other information

    </div>

   

</div> <!-- end container_upper_bg -->

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.