Append not working in jQuery -



Append not working in jQuery -

i'm trying append tp-lightboxactitem tp-lightboxcontainer. can 1 help me thing. it's not working, want lightbox activeitem comes within tp-lightboxcontainer , tp-lightboxactitem comes in center of .

$('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>');

$('<div id="tp-lightboxcontainer" class="'+opt.style+' lightboxitem"></div>') .appendto('body') .append('<div id="tp-lightboxactitem" class="'+opt.style+' lightboxitem"></div>');

you're working 1 object here, can in 1 line. jsfiddle

make container (target container) append <body> (still target container) append item container (still target container)

ps: if want utilize container more things, sense free cache putting var whatever = in front end of it.

jquery append lightbox

Comments

Popular posts from this blog

How do I check if an insert was successful with MySQLdb in Python? -

delphi - blogger via idHTTP : error 400 bad request -

postgresql - ERROR: operator is not unique: unknown + unknown -