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! Link to comment https://forums.phpfreaks.com/topic/178570-jquery-help-find-children-of/ 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? Link to comment https://forums.phpfreaks.com/topic/178570-jquery-help-find-children-of/#findComment-941791 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 --> Link to comment https://forums.phpfreaks.com/topic/178570-jquery-help-find-children-of/#findComment-943856 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(); Link to comment https://forums.phpfreaks.com/topic/178570-jquery-help-find-children-of/#findComment-943859 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 Link to comment https://forums.phpfreaks.com/topic/178570-jquery-help-find-children-of/#findComment-944608 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. Link to comment https://forums.phpfreaks.com/topic/178570-jquery-help-find-children-of/#findComment-944609 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.