Last active
August 29, 2015 14:13
-
-
Save Systerr/b15d9470070e8d6e39d6 to your computer and use it in GitHub Desktop.
Social share
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$(".social-icon").on("click",function(e){ | |
var $this = $(this); | |
if ($this.hasClass("vk_en")){ | |
Share.vkontakte(location.href); | |
} else if ($this.hasClass("fb")){ | |
Share.facebook(location.href); | |
} else if ($this.hasClass("ok")){ | |
Share.odnoklassniki(location.href); | |
} else if ($this.hasClass("g_plus")){ | |
Share.google(location.href); | |
} | |
e.preventDefault(); | |
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div class="social-box"> | |
<a href="https://www.facebook.com/" class="social-icon fb"></a> | |
<a href="https://plus.google.com/" class="social-icon g_plus"></a> | |
<a href="http://www.odnoklasnilki.ru/" class="social-icon ok"></a> | |
<a href="http://vk.com/" class="social-icon vk_en"></a> | |
</div> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment