Java specific for homepage
-
Hello!
Thanks for the plugin, for the rich documentation and for the
fast and great support!I have an homepage full width and the floating buttons go over the text in some sections.
I apply the code that you have recommended to @jamesyesjames and @fjura and it work perfectly for me too!Particularly, I insert this to adapt show and fadeout to my homepage:
jQuery(window).scroll(function () { var y = jQuery(this).scrollTop(); var url= window.location.href; if(y < 1200 || y > 2900) { jQuery('.a2a_floating_style.a2a_vertical_style').fadeOut(); } else { jQuery('.a2a_floating_style.a2a_vertical_style').show(); } });
However, in this way, the rule is applied to all other pages and post where I have page
shorter and I set primary content with specific padding left for buttons.There is a way to apply this rule only on homepage (or other specific page)?
I tried a lot of solutions, but none works for me.
For example, adding an else if
`else if(window.location.pathname == ‘/contatti’) {
jQuery(‘.a2a_floating_style.a2a_vertical_style’).show();
} ` ok in homepage, but it does not work on the specific page (perhaps because I need specific var?),or using
( is_page('contatti') )
, or( is_home() )
, but sometimes this also creates conflicts with background images and the button disappear on home.I’m sorry…I do not know java
Thanks in advance
Ro’
The page I need help with: [log in to see the link]
- The topic ‘Java specific for homepage’ is closed to new replies.