Jump to content
GreenSock

Search In
  • More options...
Find results that contain...
Find results in...
mockingbird

Help

Recommended Posts

Hi Guys totally new here, just signed up. I am looking for a starting point (document) link to get me started in using this in WordPress. 

Link to post
Share on other sites

Hello , and Welcome to the GreenSock forum!

You can view some of these forum topics:

 

http://greensock.com/forums/index.php?app=core&module=search&do=search&fromMainBar=1&search_app=forums:forum:11&search_term=wordpress%20enqueue

 

For WordPress you have to enqueue the script file so Wordpress can queue it and run it on the frontend

 

wp_enqueue_script: https://developer.wordpress.org/reference/functions/wp_enqueue_script/

<?php
// add this code snippet in your wordpress functions.php
// The proper way to enqueue GSAP script
// wp_enqueue_script( $handle, $src, $deps, $ver, $in_footer );
function theme_gsap_script() {
    wp_enqueue_script( 'gsap-js', 'http://cdnjs.cloudflare.com/ajax/libs/gsap/1.19.0/TweenMax.min.js', array(), false, true );
}
add_action( 'wp_enqueue_scripts', 'theme_gsap_script' );
?>

Other helpful info on Wordpress Codex:

 

https://codex.wordpress.org/Using_Javascript

 

Howe this helps!

:)

  • Like 1
Link to post
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.

×