Diptopol Dam
Diptopol Dam

Reputation: 815

show multiple div in colorbox

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

Answers (1)

coolguy
coolguy

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

Related Questions