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

How to show in django cms breadcrumbs full path? -

php - Invalid Cofiguration - yii\base\InvalidConfigException - Yii2 -

ruby on rails - npm error: tunneling socket could not be established, cause=connect ETIMEDOUT -