html - easy Jquery about selecting children and browsing DOM -


well think should easy it. cant wrap head around it.. code have.. in app having .scroller class selected. there used .parent() #exercisewrapper class. goal h2 tag. dont know how go on here nothing works. find() browses whole dom , children() browses 1 child..

$('.scroller').parent() something ?? hmm..

          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="../images/exercises/logo.png" class="scrollimages"></div>'+ '<div class="divimgcontainer"><img src="../images/exercises/musclegroup1.png" class="scrollimages"></div>'+ '<div class="divimgcontainer"><img src="../images/exercises/logo.png" class="scrollimages"></div>'+ '<div class="divimgcontainer"><img src="../images/exercises/musclegroup1.png" class="scrollimages"></div>'+ '<div class="divimgcontainer"><img src="../images/exercises/logo.png" class="scrollimages"></div>'+ '<div class="divimgcontainer"><img src="../images/exercises/musclegroup1.png" class="scrollimages"></div>'+       '</div></div>' 

find doesn't browse whole dom able select:

$('.scroller').parent('div.exercisewrapper').find('div.headerwrapper h2') 

Comments

Popular posts from this blog

monitor web browser programmatically in Android? -

Shrink a YouTube video to responsive width -

wpf - PdfWriter.GetInstance throws System.NullReferenceException -