-
-
Save juanbrujo/111d6f5b95fc6a33236e to your computer and use it in GitHub Desktop.
Hello, your code works perfectly unless if I put some fontawesome icons in place of the a's text. Do you know why ?
it must be because fontawesome adds own CSS (including pseudo-elements) so breaks the link element. Try adding the icon within another tag, as <i>
Hi! Your code works, but not if I replace the text inside the tag with an image. Then it opens the pop-up but doesn't do anything else. Do you know why? Thanks!!
Hi! Your code works, but not if I replace the text inside the tag with an image. Then it opens the pop-up but doesn't do anything else. Do you know why? Thanks!!
paste some code to check your HTML please
If I use this, it works perfectly:
<a href="https://www.facebook.com/sharer/sharer.php?u=https://www.mysite.com/blog/test.html" class="facebook share">
Facebook</a>
But if I use this, the pop-up opens, but the link doesn't load in the new window. It just opens an "about:blank" pop-up window:
<a href="https://www.facebook.com/sharer/sharer.php?u=https://www.mysite.com/blog/test.html" class="facebook share">
<img src="/static/images/facebook-share.png" width="64px"></a>
Thank you!
Bro, they solved it on SO. Here's the link if you're interested: https://stackoverflow.com/questions/69775905/js-wont-catch-a-link-if-there-is-an-image-in-the-anchor-tag
Thank you for the code!! Keeping the website light =)
Hello, your code works perfectly unless if I put some fontawesome icons in place of the a's text. Do you know why ?