Reputation: 815
I am trying to show a picture div and a like button div in colorbox. Picture div and like button div are both in other page. And I want to position these div in colorbox different than the page . How can I do that ?
Upvotes: 0
Views: 460
Reputation: 7954
$(document).ready(function(){
$('#somebutton').click(function(){
$.colorbox.init();
$('#divwrapper').show();
$(this).colorbox({
inline:true,
href:'#divwrapper',
onLoad:function(){
//do something if you want here
},
onClosed:function(){
$('#divwrapper').hide();
$.colorbox.remove();
}
});
});
//html side
<div id="divwrapper" style="display:none;">
<div>Your image here</div>
<div>Your like button here</div>
</div>
});
Upvotes: 1