Jump to content
Search Community

.start is not a function

JoeH test
Moderator Tag

Recommended Posts

Hi all,

 

I had this working previous but for some reason it won't anymore, I'm completely stuck on what is wrong with it. I am basically just starting a reversing a timeline on mouse in and mouse out.

 

The error is "TypeError: logoBreak.start is not a function"

 

Here is my code, thanks for any help.

 

$(function () {  
  
    var
    broken_1 = { x: 2 , y: -8, rotation: -10 },
    broken_2 = { x: -2 , y: 8 },
    broken_3 = { x: 8 , y: -8, rotation: 8 },
    broken_4 = { x: -5 , y: 0, rotation: -6 },
    broken_5 = { x: 3 , y: 4, rotation: -14 },
    broken_6 = { x: 13 , y: 3, rotation: -5 },
    broken_7 = { x: 10 , y: -1, rotation: 4 };

	var logoBreak = gsap.timeline({ paused: true })
    .to("#logo #part-4", 2, broken_4)
    .to("#logo #part-3", 2, broken_3, '-=2')
    .to("#logo #part-2", 2, broken_2, '-=2')
    .to("#logo #part-1", 2, broken_1, '-=2')
    .to("#logo #part-5", 2, broken_5, '-=2')
    .to("#logo #part-7", 2, broken_7, '-=2')
    .to("#logo #part-6", 2, broken_6, '-=2');
  
    $('#logo-wrapper').hover(function() {
        logoBreak.reverse();
    },
    function() {
        logoBreak.start();
  });
});

 

Link to comment
Share on other sites

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...