jQuery - insertafter() method

0 votes
287 views
added Mar 16, 2018 in jQuery by Callum Sergeant (1,440 points)
edited Jul 12, 2019 by LC Marshal

if body has this class, insertafter this

var notifBox = $('.notif'),
    header   = $('.header'),
    trxBox   = $('.trx');
if ($('body').hasClass('page-property-detail')) {
   $(notifBox).insertAfter(header);
   $(trxBox).hide();
}

 

1 Response

0 votes
responded May 3, 2018 by LC Marshal Captain (25,790 points)
edited Jul 12, 2019 by LC Marshal

Move element after other element

$('.forum-how-it-works').insertAfter('.container.m-b-25');

 

lazacode.org - Malaysia's programming knowledge sharing platform, where everyone can share their finding as reference to others.
...