easy Jquery about selecting children and browsing DOM

gameaiy

New Member
Well I think it should be easy to do it. However I just cant wrap my head around it.. this is the code i have.. In my app i am having the .scroller class selected. From there i used the .parent() to get to #exerciseWrapper class. My goal is the h2 tag. I dont know how to go on from here nothing works. find() browses whole DOM and children() only browses one child..$('.scroller').parent() something something ?? hmm.. \[code\] var append='<div class="exerciseWrapper"><div class="allTextWrapper"><div class="headerWrapper"><h2 class="exerciseHeaderName">'+exerciseName+'</h2></div><div class="lastConfigUsedHeader">Last configuration used:</div><div class="lastUsedConfig">Sets: 10, Kg: 12302, Time:10.30</div></div><div class="scroller">'+ '<div class="divImgContainer"><img src="http://stackoverflow.com/questions/images/exercises/logo.png" class="scrollImages"></div>'+'<div class="divImgContainer"><img src="http://stackoverflow.com/questions/images/exercises/MuscleGroup1.png" class="scrollImages"></div>'+'<div class="divImgContainer"><img src="http://stackoverflow.com/questions/images/exercises/logo.png" class="scrollImages"></div>'+'<div class="divImgContainer"><img src="http://stackoverflow.com/questions/images/exercises/MuscleGroup1.png" class="scrollImages"></div>'+'<div class="divImgContainer"><img src="http://stackoverflow.com/questions/images/exercises/logo.png" class="scrollImages"></div>'+'<div class="divImgContainer"><img src="http://stackoverflow.com/questions/images/exercises/MuscleGroup1.png" class="scrollImages"></div>'+ '</div></div>'\[/code\]
 
Back
Top