Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $('.sharethis-body .keypress-click').each(function () {
- $(this).keypress(function (e) {
- var key = e.which;
- if (key == 13) // the enter key code
- {
- $(this).click();
- console.log("click");
- return false;
- }
- return true;
- });
- });
- <div class="sharethis-body">
- <div class="sthoverbuttons-label"><span>Share</span></div>
- <span tabindex="0" class='st_facebook_large keypress-click' displaytext='Facebook' aria-label='Facebook'></span>
- <span tabindex="0" class='st_twitter_large keypress-click' displaytext='Tweet' aria-label='Twitter'></span>
- <span tabindex="0" class='st_googleplus_large keypress-click' displaytext='Google +' aria-label='Google Plus'></span>
- <span tabindex="0" class='st_linkedin_large keypress-click' displaytext='LinkedIn' aria-label='LinkedIn'></span>
- <span tabindex="0" class='st_email_large keypress-click' displaytext='Email' aria-label='Email'></span>
- </div>
Add Comment
Please, Sign In to add comment