Jump to content

Owais Ahmed

HTML5 Ad Banner

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

Hi i am new into programming and my boss asked me to convert a flash version of ad banner into HTML5 and i am not able to figure out how to do it.

Here is a Link

Can anyone please help me out. I have tried few codes but it is not working as i want it to work.


function HTML5Banner(){

    var tl = new TimelineMax();
    tl.to($("#images > img"), 0, {autoAlpha:0});
      tl.fromTo(introImg, 1, { left: 100, top: 60, autoAlpha: 0, width: "100px" }, { left: 180, top: 60, autoAlpha: 1, width: "100px", rotation: "0" });
    tl.fromTo(introTxt, 1, { left: 0, top: 60, autoAlpha: 0, width: "100px" }, { left: 30, top: 60, autoAlpha: 1, width: "100px", rotation: "0" });

    tl.to(ctaBtn, 1, {css:{opacity:1}, ease:Power4.easeOut}, "-=0.5");



I tried something like that but its not working . I am also trying to ad Jquery code in between but Jquery Animation is not working , Can anyone help me [please

Link to comment
Share on other sites

Hi and welcome to the GreenSock forums,


There could be any number of issues causing a problem outside of the code you provided.

Its best if you create a simplified demo using CodePen as explained here: http://forums.greensock.com/topic/9002-read-this-first-how-to-create-a-codepen-demo/


You have very little code so it should be fairly easy to copy and paste your html, css and JavaScript into CodePen.


For you images, you can link to hosted versions like

<img src="http://www.yourserver.com/yourimages/yourimage.jpg">


Or just use colored divs as we do in our CodePen starter files: http://codepen.io/collection/qHasJ/


I'm sure once we can see your all your code we will be able to assist you accurately and efficiently.

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.