Jump to content
GreenSock

_d3CipH3R_

Members
  • Posts

    16
  • Joined

  • Last visited

Reputation

0 Newbie

Profile Information

  • Gender
    Male

Recent Profile Visitors

1,276 profile views
  1. Hi Guys, Thanks for the help. Diaco.AW solution seemed to have helped.
  2. Hi All, I'm currently having a problem with executing some code correctly. Here's my function that's called to create a fade in effect: function AnimationFadeIn() { var fadeInDivision_1 = document.getElementById('show'); var fadeInDivision_2 = document.getElementById('output'); fader.to([fadeInDivision_1, fadeInDivision_2], 1, {opacity: 1}); } A fade out effect: function AnimationFadeOut() { var fadeInDivision_1 = document.getElementById('show'); var fadeInDivision_2 = document.getElementById('output'); fader.to([fadeInDivision_1, fadeInDivision_2], 1, {opacity: 0}); } Now, my web application uses Ajax for server interaction. So each time the user clicks a button, the process() function is executed: function process() { AnimationFadeOut(); if (xmlHttp.readyState === 4 || xmlHttp.readyState === 0) { htmlText = encodeURIComponent(document.getElementById("htmlFile").value); xmlHttp.open("GET", "ServerExecute.php?text=" + htmlText, true); xmlHttp.onreadystatechange = handleServerResponse; AnimationFadeIn(); xmlHttp.send(null); } else { setTimeout('process()', 1000); } } My problem here is that the if statement executes before the fader tween in AnimationFadeOut() function is complete. Is there any way I can check if fader in AnimationFadeOut() function is completed, before executing the if statement?
  3. Adding the jQuery ready/Javascripts onLoad event completely skipped my mind. I'm not to sure how I missed that out. Fundamentally, I had forgotten to call the code using some kind of event handler, which is basically like holding your cup under a closed tap and trying to figure out why the water isn't flowing. I pretty much feel like a complete idiot right now . Thanks for pointing that out.
  4. Thanks, I noticed that when comparing my code. Another thing which I am not familiar with is the following code on: http://codepen.io/GreenSock/pen/mIyzu I am aware that this is method chaining. I've tried placing it within the <head> but it doesn't work. It only works when I place the script after the HTML code. Why is this so?
  5. I've downloaded it on my pc. It works well, Thanks. Wasn't aware about that "share" feature on codepen.
  6. Sorry about that. Here's the link: http://codepen.io/_d3CipH3R_/pen/nxHui
  7. Hi All, I've recently seen a javascript animation created on codepen: http://codepen.io/GreenSock/pen/bkLwt Problem is it doesn't work. I've tried creating it on codepen and locally on my pc. But it doesn't work. Are these features still available?
  8. Yes I have, thanks. It works fine now
  9. I've tried using window.onmouseout but it doesn't seem to work to well. I will use the mouseleave trigger as an alternative
  10. http://codepen.io/_d3CipH3R_/pen/pLhAC
  11. Hi There, Sorry about that. I figured out how to use it. That is why I deleted the Pen. But I also need help figuring out how to stop the animation from playing. I'm using the onmouseout trigger event. Any suggestions?
  12. http://codepen.io/_d3CipH3R_/pen/drtsk It now gives me a 'illegal character' error. Still haven't figured out the difference between the two targets above. Could the error perhaps be related to my misuse of the target?
  13. I've found another useful link: http://www.greensock.com/css3/ Under clip effects
  14. I've tried adding the effects from the following web page: http://www.greensock.com/css3/ Under the section boxShadow I've noticed the target: greenPulse As well as another target: bsBox5 Do both the targets refer to the same element/reference or are they different? I've tried using this feature, but I keep getting the error that 'TweenMax is not defined'. I will upload a code snippet on codepen if needed.
×