Skip to content

Instantly share code, notes, and snippets.

@josephabrahams
Last active November 29, 2021 19:39
Show Gist options
  • Save josephabrahams/9d023596b884e80e37e5 to your computer and use it in GitHub Desktop.
Save josephabrahams/9d023596b884e80e37e5 to your computer and use it in GitHub Desktop.

Revisions

  1. josephabrahams revised this gist Aug 31, 2015. 1 changed file with 10 additions and 16 deletions.
    26 changes: 10 additions & 16 deletions socialSharePopups.js
    Original file line number Diff line number Diff line change
    @@ -1,18 +1,12 @@
    (function($) {
    function socialSharePopups() {
    $('.js-share-twitter-link').click(function(e) {
    e.preventDefault();
    var href = $(this).attr('href');
    window.open(href, "Twitter", "height=285,width=550,resizable=1");
    });
    $('.js-share-facebook-link').click(function(e) {
    e.preventDefault();
    var href = $(this).attr('href');
    window.open(href, "Facebook", "height=269,width=550,resizable=1");
    });
    }

    $('document').ready(function() {
    socialSharePopups();
    $('.js-share-twitter-link').click(function(e) {
    e.preventDefault();
    var href = $(this).attr('href');
    window.open(href, "Twitter", "height=285,width=550,resizable=1");
    });
    })(jQuery);
    $('.js-share-facebook-link').click(function(e) {
    e.preventDefault();
    var href = $(this).attr('href');
    window.open(href, "Facebook", "height=269,width=550,resizable=1");
    });
    })(jQuery);
  2. josephabrahams revised this gist Jun 11, 2015. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion socialSharePopups.js
    Original file line number Diff line number Diff line change
    @@ -15,4 +15,4 @@
    $('document').ready(function() {
    socialSharePopups();
    });
    })(jQuery, window, document);
    })(jQuery);
  3. josephabrahams revised this gist Jun 11, 2015. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion socialSharePopups.js
    Original file line number Diff line number Diff line change
    @@ -1,4 +1,4 @@
    (function($, window, document, undefined) {
    (function($) {
    function socialSharePopups() {
    $('.js-share-twitter-link').click(function(e) {
    e.preventDefault();
  4. josephabrahams created this gist Sep 15, 2014.
    18 changes: 18 additions & 0 deletions socialSharePopups.js
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,18 @@
    (function($, window, document, undefined) {
    function socialSharePopups() {
    $('.js-share-twitter-link').click(function(e) {
    e.preventDefault();
    var href = $(this).attr('href');
    window.open(href, "Twitter", "height=285,width=550,resizable=1");
    });
    $('.js-share-facebook-link').click(function(e) {
    e.preventDefault();
    var href = $(this).attr('href');
    window.open(href, "Facebook", "height=269,width=550,resizable=1");
    });
    }

    $('document').ready(function() {
    socialSharePopups();
    });
    })(jQuery, window, document);