javascript - adding sharing buttons (like "addtoany") to a single image in lightbox plugin -


i have developed own theme in wordpress using bootstrap.

i using lightbox image gallery , both trying add sharing buttons on single image opened in pop up,both trying excercise bit in using jquery.

the single image in lightbox of course comes without option of sharing buttons social network.

the div contains image element consider, , there code of snippet. tried this...

$sharingbuttons = $("</div>"); $sharingbuttons.css({top: 100, left: 20, 'absolute'});  $sharingbuttons.addclass("");  $sharingbuttons.appendto( '.lb-outercontainer' );  $('lb-outercontainer').append("<div class='addtoany_share_save_container addtoany_content_bottom'><div style='line-height: 32px;' class='a2a_kit a2a_kit_size_32 addtoany_list a2a_target' id=''> )etc...  (here snippet code of addtoany)...  </div></div>");   $('img.lb-outercontainer').css("opacity", "0.8"); 

the element $sharingbuttons div contains snippet...

it not work., has better ideas?

i use last version of jquery.

thanks paolo p.s. have use "insert after" add div beside lb-outer container_? can view website here http://www.paolobergomi.it/new-gallery/indoor-portraits/

if yo uclick on image, wish on right, in vertical layout..just attached image, appear list of sharing buttons guess insertafter option? eo added: start this?

$("

and add snippet code of addtoany in new div? tips? thanks

paolo

after append a2a div code, need execute function a2a.init('page') because addtoany script need add new code. first of all, insert class a2a_target, id div , create javascript code above:

$('lb-outercontainer').append("<div class='addtoany_share_save_container addtoany_content_bottom'><div style='line-height: 32px;' class='a2a_kit a2a_kit_size_32 addtoany_list a2a_target' id='mysharelinks'> )etc...  (here snippet code of addtoany)...  a2a_config.target = '#mysharelinks'; a2a.init('page'); 

note: a2a_config , a2a global variables created addtoany script.


Comments

Popular posts from this blog

facebook - android ACTION_SEND to share with specific application only -

python - Creating a new virtualenv gives a permissions error -

javascript - cocos2d-js draw circle not instantly -