Tagged: x
-
AuthorPosts
-
March 15, 2017 at 6:51 am #1407846
Gabriel ZParticipantHi,
I’m using the latest X 4.6.4 and I need to add a rel=”noshare” attribute to the background image which was added with the customizer.
<script>jQuery.backstretch([‘//domain.com/images/2017/03/my-background.png’], {fade: 0});</script>
I’m using image sharing buttons and I’m getting popups on mobile when someone accidentally hits the background. The problem accrues in a full-width template on mobile.
How can I add a rel=”noshare” attribute to the background image?
Thanks,
GabrielMarch 15, 2017 at 10:32 am #1408149
RupokMemberHi Gabriel,
Thanks for writing in! You can’t directly set any attributes to the background image but could be possible with some custom JS. Can you provide your URL so that I can test some code for your site?
Cheers!
March 16, 2017 at 12:48 pm #1409914
Gabriel ZParticipantThis reply has been marked as private.March 16, 2017 at 8:13 pm #1410471
FriechModeratorHi There,
Please add this in Custom > Global JavaScript on Customizer.
jQuery(document).ready(function($){ $(".backstretch img").attr("rel", "noshare"); });Hope it helps, Cheers!
March 17, 2017 at 10:47 am #1411147
Gabriel ZParticipantHi Friech,
Super, works like charm. 🙂
Thank you very much for your help.
Cheers,
GabrielMarch 17, 2017 at 3:25 pm #1411440
JadeModeratorYou’re most welcome, Gabriel.
-
AuthorPosts
- <script> jQuery(function($){ $("#no-reply-1407846 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>
