好吧,我认为这应该很容易做到。但是我就是无法绕开它..这是我拥有的代码..在我的应用程序中,我选择了 .scroller 类。从那里我使用 .parent() 进入#exerciseWrapper 类。我的目标是 h2 标签。我不知道如何从这里继续下去,没有任何效果。find() 浏览整个 DOM,而 children() 只浏览一个孩子..
$('.scroller').parent() 什么东西??唔..
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>'