Close ColorBox Popup Using Custom Button :jQuery


Hello Friends,

If you want to close the ColorBox Popup window using your custom button then use given code on your site.

Example : <input type=”button” value=”Continue to map” id=”et-reset” class=”custom-close”>

 

<script>
colorbox = jQuery.colorbox; 
jQuery(".custom-close").click(function() { 
        colorbox.close(); 
    });
</script>

Hope you all will be enjoy this script.

http://www.jacklmoore.com/colorbox/

Happy New Year To All My Friends!

Advertisements

Sr. Software Engineer

Tagged with: , ,
Posted in Drupal, Joomla, JQuery, Magento, PHP, Wordpress
3 comments on “Close ColorBox Popup Using Custom Button :jQuery
  1. chinnarasu says:

    Its working thanks

  2. jaya says:

    hi sir,
    how to create the colorbox onclick the button

    • Hi Jaya,

      Thanks for visit to my blog.

      You can open colobox on click on any tag..follow given below example.

      Click here to open lightbox

      $(document).ready(function(){
      $(“.inline”).colorbox({inline:true, width:”50%”});
      })

      This content comes from a hidden element on this page.

      The inline option preserves bound JavaScript events and changes, and it puts the content back where it came from when it is closed.

      Click me, it will be preserved!

      If you try to open a new Colorbox while it is already open, it will update itself with the new content.

      Updating Content Example:

      Feel free to contact me for any query.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: