Jump to content
Search Community

ScrollTo problem with Facebook Like Box plugin

thewebdesignerpro
Moderator Tag

Warning: Please note

This thread was started before GSAP 3 was released. Some information, especially the syntax, may be out of date for GSAP 3. Please see the GSAP 3 migration guide and release notes for more information about how to update the code to GSAP 3's syntax. 

Recommended Posts

thewebdesignerpro
Posted

Hi!

 

I'm working on a Wordpress website using Greensock. I'm also using the ScrollTo plugin. Everything's working fine until I included a Facebook Like Box. 

 

Now the ScrollTo is not behaving as expected. It no longer scroll to an anchor target smoothly. What happens now is it jumps directly to the anchor w/o the easing.

 

When I remove the Facebook Like Box code, the ScrollTo works perfectly.

 

Any ideas?

 

Thanks!

 

Posted

Hello and welcome to the GreenSock Forums!

 

is it possible to provide a link to your website that is having this issue?

 

or if you can provide a limited codepen or jsfiddle example?

 

See the Pen by pen (@pen) on CodePen.

http://jsfiddle.net/

 

this way we can see what type of JS conflict is going on in your code.

 

Thx :)

thewebdesignerpro
Posted

Hello and thanks,

 

The code for the Facebook Like Box is something like this:

 

<iframe src="//www.facebook.com/plugins/likebox.php?href=https%3A%2F%2Fwww.facebook.com%2Fpages%2FSample&width=300&height=258&colorscheme=dark&show_faces=true&header=false&stream=false&show_border=false" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:300px; height:258px;" allowTransparency="true"></iframe>

 

The code for the ScrollTo is:

 

$('a#idname').click(function(){
TweenMax.to(window, 1, {scrollTo:{y:$('#aboutus').offset().top}});
return false;
});
 
Regards
thewebdesignerpro
Posted

It's working now. Upgraded to the latest TweenMax version.

  • Like 1
Posted

Nice ..glad you got it sorted! :)

  • Like 1

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...