2
Reply

Close Colorbox on button click

Mittal Sejpal

Mittal Sejpal

Aug 25 2011 7:24 AM
3.5k
i wrote a code to close the colorbox on click of button in its content !!!
its working in chrome but not in other browsers !!
please help me 

following is the code

<button id="cboxContent" class="closebutton">
    Close</button>


following is the Script


<script type="text/javascript">

    $('#cboxContent.closebutton').live('click', function () {
        $.fn.colorbox.close();

    });


    

</script>

Answers (2)