everisk Posted October 22, 2009 Share Posted October 22, 2009 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! Quote Link to comment Share on other sites More sharing options...
haku Posted October 22, 2009 Share Posted October 22, 2009 Which children/ And is idToLoad part of container_upper_bg? Quote Link to comment Share on other sites More sharing options...
everisk Posted October 25, 2009 Author Share Posted October 25, 2009 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 --> Quote Link to comment Share on other sites More sharing options...
trq Posted October 25, 2009 Share Posted October 25, 2009 So go to the correct selecter and fade in. $('#selector').fadeIn(); Quote Link to comment Share on other sites More sharing options...
everisk Posted October 26, 2009 Author Share Posted October 26, 2009 hmm .. seem like no one gets what i want thanks anyway Quote Link to comment Share on other sites More sharing options...
trq Posted October 26, 2009 Share Posted October 26, 2009 I'm not sure your explaining yourself very well. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.