<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"lang="en-US" xml:lang="en-US" itemscope="itemscope" itemtype="http://schema.org/Article">
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
        <link rel="stylesheet" href="https://blog.blackbam.at/wp-content/themes/SilentWoodsByBlackbam/style.css" type="text/css" media="screen" />
        <meta name="viewport" content="width=device-width, height=device-height, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
        <link rel="stylesheet" href="https://blog.blackbam.at/wp-content/themes/SilentWoodsByBlackbam/a2-bigmobile.css" type="text/css" media="screen and (max-width: 860px)" />
        <link rel="stylesheet" href="https://blog.blackbam.at/wp-content/themes/SilentWoodsByBlackbam/a3-smallmobile.css" type="text/css" media="screen and (max-width: 560px)" />
        
        <!--[if lt IE 8]><link rel="stylesheet" href="https://blog.blackbam.at/wp-content/themes/SilentWoodsByBlackbam/ie.css" type="text/css" media="screen" /><![endif]-->
        <link rel="shortcut icon" href="https://blog.blackbam.at/wp-content/themes/SilentWoodsByBlackbam/images/favicon.ico" type="image/x-icon" />
        <link rel="alternate" type="application/rss+xml" title="RSS 2.0" href="https://blog.blackbam.at/feed/" />
        <link rel="alternate" type="text/xml" title="RSS .92" href="https://blog.blackbam.at/feed/rss/" />
        <link rel="alternate" type="application/atom+xml" title="Atom 0.3" href="https://blog.blackbam.at/feed/atom/" />
        <link rel="pingback" href="https://blog.blackbam.at/xmlrpc.php" />
<meta name='robots' content='max-image-preview:large' />
<link rel='dns-prefetch' href='//www.googletagmanager.com' />
<link rel='dns-prefetch' href='//static.addtoany.com' />
<link rel="alternate" type="application/rss+xml" title="Blackbams Blog &raquo; How to add social media buttons to jQuery Colorbox Comments Feed" href="https://blog.blackbam.at/2013/07/02/how-to-add-social-media-buttons-to-jquery-colorbox/feed/" />
<link rel="alternate" title="oEmbed (JSON)" type="application/json+oembed" href="https://blog.blackbam.at/wp-json/oembed/1.0/embed?url=https%3A%2F%2Fblog.blackbam.at%2F2013%2F07%2F02%2Fhow-to-add-social-media-buttons-to-jquery-colorbox%2F" />
<link rel="alternate" title="oEmbed (XML)" type="text/xml+oembed" href="https://blog.blackbam.at/wp-json/oembed/1.0/embed?url=https%3A%2F%2Fblog.blackbam.at%2F2013%2F07%2F02%2Fhow-to-add-social-media-buttons-to-jquery-colorbox%2F&#038;format=xml" />
    <meta name="robots" content="all,index,follow,noodp" />
    <!-- BEGIN CIS HEADER -->

    <!-- Standard Tags -->
    <title itemprop="name">How to add social media buttons to jQuery Colorbox • Colorbox jQuery Social Media  • Blackbams Blog</title>
    <meta name="description" lang="en-US" content="jQuery • Recently a client wanted to display social media buttons like facebook, twitter and google plus at the bottom of each image in jQuery Colorbox. As it is bad practice to change the source code of [...]" />
    <meta name="author" content="David Stöckl" />
    <meta name="publisher" content="David Stöckl" />

    <!-- Search Engines: Schema -->
    <meta itemprop="description" content="jQuery • Recently a client wanted to display social media buttons like facebook, twitter and google plus at the bottom of each image in jQuery Colorbox. As it is bad practice to change the source code of [...]" />
    <meta itemprop="primaryImageOfPage" content="https://blog.blackbam.at/wp-content/uploads/2019/03/imagex.jpg" />
    
    <!-- Open Graph -->
    <meta property="og:locale" content="en_US"/>
    <meta property="og:site_name" content="Blackbams Blog" />
    <meta property="og:type" content="website" />
    <meta property="og:title" content="How to add social media buttons to jQuery Colorbox • Colorbox jQuery Social Media  • Blackbams Blog" />
    <meta property="og:description" content="jQuery • Recently a client wanted to display social media buttons like facebook, twitter and google plus at the bottom of each image in jQuery Colorbox. As it is bad practice to change the source code of [...]" />
    <meta property="og:url" content="https://blog.blackbam.at/2013/07/02/how-to-add-social-media-buttons-to-jquery-colorbox/" />
    <meta property="og:image" content="https://blog.blackbam.at/wp-content/uploads/2019/03/imagex.jpg" />
    <meta property="og:updated_time" content="2013-07-02T15:57:59+0000" />
    <!-- Twitter -->
    <meta name="twitter:title" content="How to add social media buttons to jQuery Colorbox • Colorbox jQuery Social Media  • Blackbams Blog"/>
    <meta name="twitter:description" content="jQuery • Recently a client wanted to display social media buttons like facebook, twitter and google plus at the bottom of each image in jQuery Colorbox. As it is bad practice to change the source code of [...]"/>
    <meta name="twitter:url" content="https://blog.blackbam.at/2013/07/02/how-to-add-social-media-buttons-to-jquery-colorbox/"/>
    <meta name="twitter:card" content="summary_large_image"/>
    <meta name="twitter:image" content="https://blog.blackbam.at/wp-content/uploads/2019/03/imagex.jpg">
    
    <link rel="pingback" href="https://blog.blackbam.at/xmlrpc.php" />
    <link rel="shortlink" href="" />
            <link itemprop="url" rel="canonical" href="https://blog.blackbam.at/2013/07/02/how-to-add-social-media-buttons-to-jquery-colorbox/" />
    
    <!-- app colors -->
    <meta name="msapplication-TileColor" content="#272c36">
    <meta name="theme-color" content="#272c36">

    <!-- favicon & app icon -->
                <link rel="apple-touch-icon" sizes="57x57" href="https://blog.blackbam.at/wp-content/mu-plugins/code-is-passion-libraries-plugin/imageserver/imageserver.php?src=https://blog.blackbam.at/wp-content/uploads/2019/03/favicon-xlarge.jpg&w=57&h=57&q=80&zc=1">
                    <link rel="apple-touch-icon" sizes="60x60" href="https://blog.blackbam.at/wp-content/mu-plugins/code-is-passion-libraries-plugin/imageserver/imageserver.php?src=https://blog.blackbam.at/wp-content/uploads/2019/03/favicon-xlarge.jpg&w=60&h=60&q=80&zc=1">
                    <link rel="apple-touch-icon" sizes="72x72" href="https://blog.blackbam.at/wp-content/mu-plugins/code-is-passion-libraries-plugin/imageserver/imageserver.php?src=https://blog.blackbam.at/wp-content/uploads/2019/03/favicon-xlarge.jpg&w=72&h=72&q=80&zc=1">
                    <link rel="apple-touch-icon" sizes="76x76" href="https://blog.blackbam.at/wp-content/mu-plugins/code-is-passion-libraries-plugin/imageserver/imageserver.php?src=https://blog.blackbam.at/wp-content/uploads/2019/03/favicon-xlarge.jpg&w=76&h=76&q=80&zc=1">
                    <link rel="apple-touch-icon" sizes="114x114" href="https://blog.blackbam.at/wp-content/mu-plugins/code-is-passion-libraries-plugin/imageserver/imageserver.php?src=https://blog.blackbam.at/wp-content/uploads/2019/03/favicon-xlarge.jpg&w=114&h=114&q=80&zc=1">
                    <link rel="apple-touch-icon" sizes="120x120" href="https://blog.blackbam.at/wp-content/mu-plugins/code-is-passion-libraries-plugin/imageserver/imageserver.php?src=https://blog.blackbam.at/wp-content/uploads/2019/03/favicon-xlarge.jpg&w=120&h=120&q=80&zc=1">
                    <link rel="apple-touch-icon" sizes="144x144" href="https://blog.blackbam.at/wp-content/mu-plugins/code-is-passion-libraries-plugin/imageserver/imageserver.php?src=https://blog.blackbam.at/wp-content/uploads/2019/03/favicon-xlarge.jpg&w=144&h=144&q=80&zc=1">
                    <link rel="apple-touch-icon" sizes="152x152" href="https://blog.blackbam.at/wp-content/mu-plugins/code-is-passion-libraries-plugin/imageserver/imageserver.php?src=https://blog.blackbam.at/wp-content/uploads/2019/03/favicon-xlarge.jpg&w=152&h=152&q=80&zc=1">
                    <link rel="apple-touch-icon" sizes="180x180" href="https://blog.blackbam.at/wp-content/mu-plugins/code-is-passion-libraries-plugin/imageserver/imageserver.php?src=https://blog.blackbam.at/wp-content/uploads/2019/03/favicon-xlarge.jpg&w=180&h=180&q=80&zc=1">
                    <link rel="icon" type="image/png" sizes="192x192" href="https://blog.blackbam.at/wp-content/mu-plugins/code-is-passion-libraries-plugin/imageserver/imageserver.php?src=https://blog.blackbam.at/wp-content/uploads/2019/03/favicon-xlarge.jpg&w=192&h=192&q=80&zc=1">
                    <link rel="icon" type="image/png" sizes="32x32" href="https://blog.blackbam.at/wp-content/mu-plugins/code-is-passion-libraries-plugin/imageserver/imageserver.php?src=https://blog.blackbam.at/wp-content/uploads/2019/03/favicon-xlarge.jpg&w=32&h=32&q=80&zc=1">
                    <link rel="icon" type="image/png" sizes="96x96" href="https://blog.blackbam.at/wp-content/mu-plugins/code-is-passion-libraries-plugin/imageserver/imageserver.php?src=https://blog.blackbam.at/wp-content/uploads/2019/03/favicon-xlarge.jpg&w=96&h=96&q=80&zc=1">
                    <link rel="icon" type="image/png" sizes="60x60" href="https://blog.blackbam.at/wp-content/mu-plugins/code-is-passion-libraries-plugin/imageserver/imageserver.php?src=https://blog.blackbam.at/wp-content/uploads/2019/03/favicon-xlarge.jpg&w=60&h=60&q=80&zc=1">
            <!-- END CIS HEADER -->
    <style id="wp-img-auto-sizes-contain-inline-css">
img:is([sizes=auto i],[sizes^="auto," i]){contain-intrinsic-size:3000px 1500px}
/*# sourceURL=wp-img-auto-sizes-contain-inline-css */
</style>
<link rel='stylesheet' id='cis-gdpr-footer-css' href='https://blog.blackbam.at/wp-content/mu-plugins/code-is-passion-libraries-plugin/addons/gdpr-footer/gdpr-footer.css?ver=173' media='all' />
<style id="wp-block-library-inline-css">
:root{--wp-block-synced-color:#7a00df;--wp-block-synced-color--rgb:122,0,223;--wp-bound-block-color:var(--wp-block-synced-color);--wp-editor-canvas-background:#ddd;--wp-admin-theme-color:#007cba;--wp-admin-theme-color--rgb:0,124,186;--wp-admin-theme-color-darker-10:#006ba1;--wp-admin-theme-color-darker-10--rgb:0,107,160.5;--wp-admin-theme-color-darker-20:#005a87;--wp-admin-theme-color-darker-20--rgb:0,90,135;--wp-admin-border-width-focus:2px}@media (min-resolution:192dpi){:root{--wp-admin-border-width-focus:1.5px}}.wp-element-button{cursor:pointer}:root .has-very-light-gray-background-color{background-color:#eee}:root .has-very-dark-gray-background-color{background-color:#313131}:root .has-very-light-gray-color{color:#eee}:root .has-very-dark-gray-color{color:#313131}:root .has-vivid-green-cyan-to-vivid-cyan-blue-gradient-background{background:linear-gradient(135deg,#00d084,#0693e3)}:root .has-purple-crush-gradient-background{background:linear-gradient(135deg,#34e2e4,#4721fb 50%,#ab1dfe)}:root .has-hazy-dawn-gradient-background{background:linear-gradient(135deg,#faaca8,#dad0ec)}:root .has-subdued-olive-gradient-background{background:linear-gradient(135deg,#fafae1,#67a671)}:root .has-atomic-cream-gradient-background{background:linear-gradient(135deg,#fdd79a,#004a59)}:root .has-nightshade-gradient-background{background:linear-gradient(135deg,#330968,#31cdcf)}:root .has-midnight-gradient-background{background:linear-gradient(135deg,#020381,#2874fc)}:root{--wp--preset--font-size--normal:16px;--wp--preset--font-size--huge:42px}.has-regular-font-size{font-size:1em}.has-larger-font-size{font-size:2.625em}.has-normal-font-size{font-size:var(--wp--preset--font-size--normal)}.has-huge-font-size{font-size:var(--wp--preset--font-size--huge)}:root .has-text-align-center{text-align:center}:root .has-text-align-left{text-align:left}:root .has-text-align-right{text-align:right}.has-fit-text{white-space:nowrap!important}#end-resizable-editor-section{display:none}.aligncenter{clear:both}.items-justified-left{justify-content:flex-start}.items-justified-center{justify-content:center}.items-justified-right{justify-content:flex-end}.items-justified-space-between{justify-content:space-between}.screen-reader-text{word-wrap:normal!important;border:0;clip-path:inset(50%);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.screen-reader-text:focus{background-color:#ddd;clip-path:none;color:#444;display:block;font-size:1em;height:auto;left:5px;line-height:normal;padding:15px 23px 14px;text-decoration:none;top:5px;width:auto;z-index:100000}html :where(.has-border-color){border-style:solid}html :where([style*=border-color]){border-style:solid}html :where([style*=border-top-color]){border-top-style:solid}html :where([style*=border-right-color]){border-right-style:solid}html :where([style*=border-bottom-color]){border-bottom-style:solid}html :where([style*=border-left-color]){border-left-style:solid}html :where([style*=border-width]){border-style:solid}html :where([style*=border-top-width]){border-top-style:solid}html :where([style*=border-right-width]){border-right-style:solid}html :where([style*=border-bottom-width]){border-bottom-style:solid}html :where([style*=border-left-width]){border-left-style:solid}html :where(img[class*=wp-image-]){height:auto;max-width:100%}:where(figure){margin:0 0 1em}html :where(.is-position-sticky){--wp-admin--admin-bar--position-offset:var(--wp-admin--admin-bar--height,0px)}@media screen and (max-width:600px){html :where(.is-position-sticky){--wp-admin--admin-bar--position-offset:0px}}
/*wp_block_styles_on_demand_placeholder:6a2d42c42b59e*/
/*# sourceURL=wp-block-library-inline-css */
</style>
<style id="classic-theme-styles-inline-css">
/*! This file is auto-generated */
.wp-block-button__link{color:#fff;background-color:#32373c;border-radius:9999px;box-shadow:none;text-decoration:none;padding:calc(.667em + 2px) calc(1.333em + 2px);font-size:1.125em}.wp-block-file__button{background:#32373c;color:#fff;text-decoration:none}
/*# sourceURL=/wp-includes/css/classic-themes.min.css */
</style>
<style id="wp-block-styles-placeholder-inline-css">
:root { --wp-internal-comment: "Placeholder for wp_hoist_late_printed_styles() to replace with the block styles printed at wp_footer." }
/*# sourceURL=wp-block-styles-placeholder-inline-css */
</style>
<style id="wp-global-styles-placeholder-inline-css">
:root { --wp-internal-comment: "Placeholder for wp_hoist_late_printed_styles() to replace with the global-styles printed at wp_footer." }
/*# sourceURL=wp-global-styles-placeholder-inline-css */
</style>
<link rel='stylesheet' id='bb-taps-editor-style-shared-css' href='https://blog.blackbam.at/wp-content/themes/SilentWoodsByBlackbam/editor-style-shared.css?ver=7.0' media='all' />
<link rel='stylesheet' id='newsletter-css' href='https://blog.blackbam.at/wp-content/plugins/newsletter/style.css?ver=9.2.6' media='all' />
<link rel='stylesheet' id='addtoany-css' href='https://blog.blackbam.at/wp-content/plugins/add-to-any/addtoany.min.css?ver=1.16' media='all' />
<script id="jquery-core-js" src="https://blog.blackbam.at/wp-includes/js/jquery/jquery.min.js?ver=3.7.1"></script>
<script id="jquery-migrate-js" src="https://blog.blackbam.at/wp-includes/js/jquery/jquery-migrate.min.js?ver=3.4.1"></script>
<script id="cis-js-globals-js-extra">
var CISJSGLOBALS = {"template_url":"https://blog.blackbam.at/wp-content/themes/SilentWoodsByBlackbam","imageserver_url":"https://blog.blackbam.at/wp-content/mu-plugins/code-is-passion-libraries-plugin/imageserver/imageserver.php","default_image":"https://blog.blackbam.at/wp-content/mu-plugins/code-is-passion-libraries-plugin/images/default.svg"};
//# sourceURL=cis-js-globals-js-extra
</script>
<script id="cis-js-globals-js" src="https://blog.blackbam.at/wp-content/mu-plugins/code-is-passion-libraries-plugin/base/codeispassion-libraries.js?ver=1"></script>
<script id="lib-cis-il8n-js-extra">
var CIS_I8 = {"enable":"1","cur":"en","default":"en","lan":["en","de"],"suffixes":["","____de"],"lanmap":{"en":"English","de":"Deutsch"},"sep":"____","qtrans":""};
//# sourceURL=lib-cis-il8n-js-extra
</script>
<script id="lib-cis-il8n-js" src="https://blog.blackbam.at/wp-content/mu-plugins/code-is-passion-libraries-plugin/il8n/js/lib_cis_il8n.js?ver=173"></script>
<script src='https://www.googletagmanager.com/gtag/js?id=UA-136689836-1&ver=1' async></script><script id="cis-seo-google-analytics-header-js-after">
window.dataLayer = window.dataLayer || [];function gtag(){dataLayer.push(arguments);}gtag('js', new Date());gtag('config', 'UA-136689836-1');
//# sourceURL=cis-seo-google-analytics-header-js-after
</script>
<script id="addtoany-core-js-before">
window.a2a_config=window.a2a_config||{};a2a_config.callbacks=[];a2a_config.overlays=[];a2a_config.templates={};

//# sourceURL=addtoany-core-js-before
</script>
<script id="addtoany-core-js" defer src="https://static.addtoany.com/menu/page.js"></script>
<script id="addtoany-jquery-js" defer src="https://blog.blackbam.at/wp-content/plugins/add-to-any/addtoany.min.js?ver=1.1"></script>
<link rel="https://api.w.org/" href="https://blog.blackbam.at/wp-json/" /><link rel="alternate" title="JSON" type="application/json" href="https://blog.blackbam.at/wp-json/wp/v2/posts/2059" /><link rel="EditURI" type="application/rsd+xml" title="RSD" href="https://blog.blackbam.at/xmlrpc.php?rsd" />
<meta name="generator" content="WordPress 7.0" />
<link rel='shortlink' href='https://blog.blackbam.at/?p=2059' />
	<style type="text/css">
		.chi_display_header {
			background-repeat:no-repeat;
			background-position:center center;
		}
	</style>
<style type="text/css">
.qtranxs_flag_de {background-image: url(https://blog.blackbam.at/wp-content/plugins/qtranslate-xt/flags/de.png); background-repeat: no-repeat;}
.qtranxs_flag_en {background-image: url(https://blog.blackbam.at/wp-content/plugins/qtranslate-xt/flags/gb.png); background-repeat: no-repeat;}
</style>
<link hreflang="de" href="https://blog.blackbam.at/de/2013/07/02/how-to-add-social-media-buttons-to-jquery-colorbox/" rel="alternate" />
<link hreflang="en" href="https://blog.blackbam.at/en/2013/07/02/how-to-add-social-media-buttons-to-jquery-colorbox/" rel="alternate" />
<link hreflang="x-default" href="https://blog.blackbam.at/2013/07/02/how-to-add-social-media-buttons-to-jquery-colorbox/" rel="alternate" />
<meta name="generator" content="qTranslate-XT 3.5.3" />
<style>.recentcomments a{display:inline !important;padding:0 !important;margin:0 !important;}</style>    </head>
    <body class="wp-singular post-template-default single single-post postid-2059 single-format-standard wp-theme-SilentWoodsByBlackbam">
        <div id="container">
            <div id="content">
                <div id="leftcontent">
                </div>
                <div id="rightcontent">
                </div>
                <div id="ctborder">
                    <div id="incontent">
                        <div id="inincontent">
                            <div id="head">
                                <div id="headings">
                                    <div id="logo">
                                        <img id="logo_img" src="https://blog.blackbam.at/wp-content/themes/SilentWoodsByBlackbam/images/logo.jpg" width="70" height="70" alt="" />
                                    </div>
                                    <div id="bloginfo">
                                        <h1 id="blogtitle"><a href="https://blog.blackbam.at">Blackbams Blog</a></h1>
                                        <h3 id="blogdescription">development &#8211; digital arts &#8211; internet</h3>
                                    </div>
                                    <!-- bloginfo div -->
									<style type="text/css">
.qtranxs_widget ul { margin: 0; }
.qtranxs_widget ul li
{
display: inline; /* horizontal list, use "list-item" or other appropriate value for vertical list */
list-style-type: none; /* use "initial" or other to enable bullets */
margin: 0 5px 0 0; /* adjust spacing between items */
opacity: 0.5;
-o-transition: 1s ease opacity;
-moz-transition: 1s ease opacity;
-webkit-transition: 1s ease opacity;
transition: 1s ease opacity;
}
/* .qtranxs_widget ul li span { margin: 0 5px 0 0; } */ /* other way to control spacing */
.qtranxs_widget ul li.active { opacity: 0.8; }
.qtranxs_widget ul li:hover { opacity: 1; }
.qtranxs_widget img { box-shadow: none; vertical-align: middle; display: initial; }
.qtranxs_flag { height:12px; width:18px; display:block; }
.qtranxs_flag_and_text { padding-left:20px; }
.qtranxs_flag span { display:none; }
</style>
<div id="sidebar_header">
<ul class="language-chooser language-chooser-both qtranxs_language_chooser" id="qtranslate-5-chooser">
<li><a href="https://blog.blackbam.at/de/2013/07/02/how-to-add-social-media-buttons-to-jquery-colorbox/" class="qtranxs_flag_de qtranxs_flag_and_text" title="Deutsch (de)"><span>Deutsch</span></a></li>
<li class="active"><a href="https://blog.blackbam.at/en/2013/07/02/how-to-add-social-media-buttons-to-jquery-colorbox/" class="qtranxs_flag_en qtranxs_flag_and_text" title="English (en)"><span>English</span></a></li>
</ul><div class="qtranxs_widget_end"></div>
</div>       
									<div id="daily_featured">
										<p>Knowledge is free. No one may take possession of it.</p>
									</div>
									<div class="clear"> </div>                
                                </div>
                                <!-- headings div -->
                                <div id="picture">
                                    <div id="inpicture">
                                        <!-- background image -->
                                    </div>
                                    <!-- inpicture div -->
                                </div>
                                <!-- picture div -->
                                <div style="clear:both;">
                                </div>
                                <div id="main_navigation" class="wp-nav-menu-wrapper "><ul id="menu-main" class="menu"><li id="menu-item-928" class="menu-item menu-item-type-custom menu-item-object-custom menu-item-home cis-level-0 menu-item-928"><a href="https://blog.blackbam.at/">Overview</a></li>
<li id="menu-item-929" class="menu-item menu-item-type-post_type menu-item-object-page cis-level-0 menu-item-929"><a href="https://blog.blackbam.at/blackbams-links/">Linklist</a></li>
<li id="menu-item-930" class="menu-item menu-item-type-post_type menu-item-object-page cis-level-0 menu-item-930"><a href="https://blog.blackbam.at/developer-news/">Developer News</a></li>
<li id="menu-item-932" class="menu-item menu-item-type-custom menu-item-object-custom cis-level-0 menu-item-932"><a href="https://blog.blackbam.at/2010/10/25/core-theme/">WP Core Theme</a></li>
<li id="menu-item-931" class="menu-item menu-item-type-post_type menu-item-object-page cis-level-0 menu-item-931"><a href="https://blog.blackbam.at/impressum/">About this blog</a></li>
</ul></div>                                
                                <div id="menu_mobile" class="mobile-only">
                                    <div id="menu_mobile_bar"></div>
                                    <div id="menu_mobile_inner">
                                        <div class="menu_mobile_closer"></div>
                                            <div id="menu_mobile_actual" class="wp-nav-menu-wrapper "><ul id="menu-main-1" class="menu"><li class="menu-item menu-item-type-custom menu-item-object-custom menu-item-home cis-level-0 menu-item-928"><a href="https://blog.blackbam.at/">Overview</a></li>
<li class="menu-item menu-item-type-post_type menu-item-object-page cis-level-0 menu-item-929"><a href="https://blog.blackbam.at/blackbams-links/">Linklist</a></li>
<li class="menu-item menu-item-type-post_type menu-item-object-page cis-level-0 menu-item-930"><a href="https://blog.blackbam.at/developer-news/">Developer News</a></li>
<li class="menu-item menu-item-type-custom menu-item-object-custom cis-level-0 menu-item-932"><a href="https://blog.blackbam.at/2010/10/25/core-theme/">WP Core Theme</a></li>
<li class="menu-item menu-item-type-post_type menu-item-object-page cis-level-0 menu-item-931"><a href="https://blog.blackbam.at/impressum/">About this blog</a></li>
</ul></div>                                    </div>
                                </div>
                                
                                
                                
                            </div>
                            <!-- head div -->
                            <div style="clear:both;">
                            </div>
                            <div id="mainpart">
                                <!-- Ende des Kopfbereichs -->

<div id="single_article">


<div id="single_nav">
			<div class="lfloat">&laquo; <a href="https://blog.blackbam.at/2013/07/03/postgresql-plpgsql-and-java-quick-syntactic-overview-with-examples/" rel="next">PostgreSQL, PL/pgSQL and Java: Quick syntactic overview with examples</a></div>
			<div class="rfloat"><a href="https://blog.blackbam.at/2013/06/03/wordpress-plugin-tinymce-and-tinymce-advanced-professsional-formats-and-styles/" rel="prev">WordPress Plugin: TinyMCE and TinyMCE Advanced Professsional Formats and Styles</a> &raquo;</div>
</div><!-- single_nav div -->
<div style="clear:both;"></div>
<div id="single_bord1"></div>

	<div id="post-2059">
			<div class="wp_article_head">
         	  <div class="date_auth">
          		 <div class="date">
           		  2. July 2013          	     </div><!-- date div -->
            	 <div class="author">
            	 von Blackbam           	     </div><!-- author div -->
             </div><!-- date_auth div -->
             <div class="art_head">
               <h1>|| <a href="https://blog.blackbam.at/2013/07/02/how-to-add-social-media-buttons-to-jquery-colorbox/" rel="bookmark" title="Permalink: How to add social media buttons to jQuery Colorbox">How to add social media buttons to jQuery Colorbox</a></h1>
            </div><!-- art_head div -->
            </div><!-- wp_article_head div -->
           <div class="art_seperator">
           </div> <!-- art_seperator div -->
           <div class="art_content">
           		<p>Recently a client wanted to display social media buttons like facebook, twitter and google plus at the bottom of each image in jQuery Colorbox. As it is bad practice to change the source code of a Plugin, the following code worked well for this job.</p>
<p>&nbsp;</p>
<p>Note: This client wanted the full URL to be liked, not the image itself &#8211; if you want to do so, you should &nbsp;like/recommend the attachemnt URL of the colorbox images, not the URL of the page. I will leave this up to you, to change the code in this way.</p>
<p>&nbsp;</p>
<div class="code_title">Add the following jQuery code to the footer of your page:</div>
<pre lang="javascript">

		jQuery(document).ready(function() { 
			var facebook = '<div class="cb_social_elem cb_fb"><div class="fb-like" data-href="" data-send="false" data-layout="button_count" data-width="160" data-show-faces="true" data-font="arial"></div></div>';
			var twitter = '<div class="cb_social_elem"><a href="https://twitter.com/share" class="twitter-share-button" data-lang="de" data-count="horizontal">Tweet</a></div>';
			var google = '<div class="cb_social_elem"><g:plusone size="medium" annotation="bubble"></g:plusone></div>';
			
		    jQuery("#cboxContent").append('<div id="cboxSocials">'+facebook+twitter+google+'</div><div class="clear"></div>'); 
		});
			
</pre>
<div class="code_title">CSS code</div>
<pre lang="css">
#cboxSocials {
	margin-top:-43px;
}

.cb_social_elem {
	float:left;
	margin-right:20px;
	width:120px;
}

</pre>
<p>&nbsp;</p>
<h3>Social Buttons Developer Links</h3>
<p><a href="https://developers.facebook.com/docs/reference/plugins/like/">Facebook Like</a></p>
<p><a href="https://dev.twitter.com/docs/tweet-button">Twitter</a></p>
<p><a href="https://developers.google.com/+/web/+1button/">Google+</a></p>
<p><a href="http://developer.linkedin.com/retrieving-share-counts-custom-buttons">LinkedIn</a></p>
<p><a href="http://business.pinterest.com/widget-builder/">Pinterest</a></p></p>
<div class="addtoany_share_save_container addtoany_content addtoany_content_bottom"><div class="a2a_kit a2a_kit_size_32 addtoany_list" data-a2a-url="https://blog.blackbam.at/2013/07/02/how-to-add-social-media-buttons-to-jquery-colorbox/" data-a2a-title="How to add social media buttons to jQuery Colorbox"><a class="a2a_dd addtoany_share_save addtoany_share" href="https://www.addtoany.com/share"><img src="https://static.addtoany.com/buttons/share_save_120_16.png" alt="Share"></a></div></div>            </div><!-- art_content div -->
                
                
			<div id="single_zusatz">
				<p>
				
												Dieser Eintrag wurde am 2. July 2013 um 15:15 in der Kategorie <a href="https://blog.blackbam.at/category/web-development/jquery/" rel="category tag">jQuery</a> ver&ouml;ffentlicht.						You can book the comments for this article <a href='https://blog.blackbam.at/2013/07/02/how-to-add-social-media-buttons-to-jquery-colorbox/feed/'>RSS 2.0</a>. 
													Feedback, discussion, commendation and critics are welcome: <a href=\"#respond\">Write a comment</a> or <a href=\"https://blog.blackbam.at/2013/07/02/how-to-add-social-media-buttons-to-jquery-colorbox/trackback/\" rel=\"trackback\">trackback</a>.
						                    
                                       <!-- pruefen ob externe links zu dem Thema existieren und sie ausgeben, benoetigt ext_related_links plugin -->
                    
                    
                   </p>
               <br/><p>Tags: <a href="https://blog.blackbam.at/tag/colorbox/" rel="tag">Colorbox</a>, <a href="https://blog.blackbam.at/tag/jquery/" rel="tag">jQuery</a>, <a href="https://blog.blackbam.at/tag/social-media/" rel="tag">Social Media</a></p>  
   		   </div> <!-- single_zusatz div -->		   		   	</div> <!-- single_article div -->

    	

<div id="comments">
<h3 id="cmt_head">Already 12 comments belonging to "How to add social media buttons to jQuery Colorbox": </h3>
<p id="cmt_und"><a href="https://blog.blackbam.at/2013/07/02/how-to-add-social-media-buttons-to-jquery-colorbox/feed/">Kommentare abonnieren (RSS)</a> or <a href="https://blog.blackbam.at/2013/07/02/how-to-add-social-media-buttons-to-jquery-colorbox/trackback/">URL Trackback</a></p>





<div id="comment-55632" class="kommentar">
	
	<div class="gravatar">
		<img alt='' src='https://secure.gravatar.com/avatar/56119b0abac57d3469377bdc84e6504860e427d4f2e21c6e2d1b2f82db825c69?s=48&#038;d=mm&#038;r=r' srcset='https://secure.gravatar.com/avatar/56119b0abac57d3469377bdc84e6504860e427d4f2e21c6e2d1b2f82db825c69?s=96&#038;d=mm&#038;r=r 2x' class='avatar avatar-48 photo' height='48' width='48' decoding='async'/>	</div>
	
	<div class="outer_comment_box">
		<div class="comment_box">
		<h4> <a href="mailto:he@hewhoeatspumpkins.com">peter ames</a><a href="mailto:he@hewhoeatspumpkins.com">&#160;<img src="https://blog.blackbam.at/wp-content/themes/SilentWoodsByBlackbam/images/mail.jpg" width="11" height="12" alt="" /></a>&#160;&#160;says: </h4>
		
		<p id="cmt_infozst">on 09. October 2013 at 20:17 on clock </p>
		<br />
		Great script! Thanks! Any idea how I'd actually make it able to like the image and not the entire page?		</div><!-- comment_box div -->
		
		<div style="clear:both;"></div>
		</div>
	<div style="clear:both;"></div>

</div><!-- kommentar div -->






<div id="comment-55633" class="kommentar">
	
	<div class="gravatar">
		<img alt='' src='https://secure.gravatar.com/avatar/d5a5c9cf6d94c8c10375b6fb48c0cc28e9df3c4d446ca18611bb544b274dd20e?s=48&#038;d=mm&#038;r=r' srcset='https://secure.gravatar.com/avatar/d5a5c9cf6d94c8c10375b6fb48c0cc28e9df3c4d446ca18611bb544b274dd20e?s=96&#038;d=mm&#038;r=r 2x' class='avatar avatar-48 photo' height='48' width='48' decoding='async'/>	</div>
	
	<div class="outer_comment_box">
		<div class="comment_box">
		<h4> <a href="mailto:blackbam@hotmail.de">Blackbam</a><a href="mailto:blackbam@hotmail.de">&#160;<img src="https://blog.blackbam.at/wp-content/themes/SilentWoodsByBlackbam/images/mail.jpg" width="11" height="12" alt="" /></a> <a href="https://blog.blackbam.at/">&#160;<img src="<error>
    <code>internal_server_error</code>
    <title><![CDATA[WordPress &amp;rsaquo; Error]]></title>
    <message><![CDATA[&lt;p&gt;There has been a critical error on this website.&lt;/p&gt;&lt;p&gt;&lt;a href=&quot;https://wordpress.org/documentation/article/faq-troubleshooting/&quot;&gt;Learn more about troubleshooting WordPress.&lt;/a&gt;&lt;/p&gt;]]></message>
    <data>
        <status>500</status>
    </data>
</error>
