Pen Settings



CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URL's added here will be added as <link>s in order, and before the CSS in the editor. You can use the CSS from another Pen by using it's URL and the proper URL extention.

+ add another resource


Babel includes JSX processing.

Add External Scripts/Pens

Any URL's added here will be added as <script>s in order, and run before the JavaScript in the editor. You can use the URL of any other Pen and it will include the JavaScript from that Pen.

+ add another resource


Add Packages

Search for and use JavaScript packages from npm here. By selecting a package, an import statement will be added to the top of the JavaScript editor for this package.


Save Automatically?

If active, Pens will autosave every 30 seconds after being saved once.

Auto-Updating Preview

If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.

Format on Save

If enabled, your code will be formatted when you actively save your Pen. Note: your code becomes un-folded during formatting.

Editor Settings

Code Indentation

Want to change your Syntax Highlighting theme, Fonts and more?

Visit your global Editor Settings.


    <a class="facebook customer share" href="" title="Facebook share" target="_blank">Facebook</a>
    <a class="twitter customer share" href=";text=Share popup on &amp;hashtags=codepen" title="Twitter share" target="_blank">Twitter</a>
    <a class="google_plus customer share" href="" title="Google Plus Share" target="_blank">Google Plus</a>
    <a class="xing customer share" href="" title="Xing Share" target="_blank">Xing</a>
    <a class="linkedin customer share" href="" title="linkedin Share" target="_blank">LinkedIn</a>


                @import "compass/css3";

body {
  margin: 50px;
  text-align: center;
  ul {
    list-style: none;
    li {
      display: inline-block;
      margin: 0 10px;


   * jQuery function to prevent default anchor event and take the href * and the title to make a share popup
   * @param  {[object]} e           [Mouse event]
   * @param  {[integer]} intWidth   [Popup width defalut 500]
   * @param  {[integer]} intHeight  [Popup height defalut 400]
   * @param  {[boolean]} blnResize  [Is popup resizeabel default true]
  $.fn.customerPopup = function (e, intWidth, intHeight, blnResize) {
    // Prevent default anchor event
    // Set values for window
    intWidth = intWidth || '500';
    intHeight = intHeight || '400';
    strResize = (blnResize ? 'yes' : 'no');

    // Set title and open popup with focus on it
    var strTitle = ((typeof this.attr('title') !== 'undefined') ? this.attr('title') : 'Social Share'),
        strParam = 'width=' + intWidth + ',height=' + intHeight + ',resizable=' + strResize,            
        objWindow ='href'), strTitle, strParam).focus();
  /* ================================================== */
  $(document).ready(function ($) {
    $('.customer.share').on("click", function(e) {