I’m trying to append tp-lightboxactitem into tp-lightboxcontainer. Can any one help me with this thing. It’s not working, I want that lightbox activeitem comes inside tp-lightboxcontainer and tp-lightboxactitem comes in center of it .
$('body').append('<div id="tp-lightboxcontainer" class="'+opt.style+' lightboxitem"></div>');
var tp-lightboxcontainer=find('#tp-lightboxcontainer');
tp-lightboxcontainer.append('<div id="tp-lightboxactitem" class="'+opt.style+' lightboxitem"></div>');
You’re really only working with one object here, so you can do this in one line. jsFiddle
<body>(still target container)ps: if you want to use that container for more things, feel free to cache it too by putting
var whatever =in front of it.