javascript - js append div to only current parents child -


i have div block repeated on page each product. using js cycle through instances of div class , move div div in same block. wrote this:

$(value).appendto('.product-image') 

and adds each div product-image divs on page. how can add each div product-image div child of $(values) parent?

this did not work me:

$(value).appendto($(value).parent().find('.product-image')) 

try select first parent div. $(value).appendto($(value).parent('div:first()').find('.product-image'))


Comments

Popular posts from this blog

html - Difficulties with background-image property -

visual studio code - What does the isShellCommand property actually do and how should you use it? -

ios - Segue not passing data between ViewControllers -