Moving an element with InsertAfter, but only insert it the parent of the elements?

Posted by alexchenco on Stack Overflow See other posts from Stack Overflow or by alexchenco
Published on 2012-11-05T04:31:54Z Indexed on 2012/11/05 5:00 UTC
Read the original article Hit count: 226

Filed under:

I did the following:

  jQuery('.businessdirectory-category .wpbdp-rating-info').insertAfter('.businessdirectory-category .title');

To move .wpbdp-rating-info after .title. But there are 3 .wpbdp-rating-info in the page so now each .businessdirectory-category has 3 .wpbdp-rating-info

How can I do it so that each .businessdirectory-category only has its own .wpbdp-rating-infoappended to its own.title`?

EDIT:

enter image description here

© Stack Overflow or respective owner

Related posts about jQuery