Jonathan last won the day on March 26

Jonathan had the most liked content!

Jonathan

Moderators
  • Content count

    3,346
  • Joined

  • Last visited

  • Days Won

    123

Jonathan last won the day on March 26

Jonathan had the most liked content!

Community Reputation

4,520 Superhero

2 Followers

About Jonathan

  • Rank
    Super Moderator

Contact Methods

Profile Information

  • Gender
    Male
  • Location
    United States
  • Interests
    Traditional Animation, Computer Animation, Drawing, DJing, Mycology, Traditional Chinese Medicine, and Herbalism

Recent Profile Visitors

20,691 profile views
  1. Browser Behaves Differently than Code Pen

    Hello @Hugh Nivers and Welcome to the GreenSock Forum! What browser and browser version do you see this difference of behavior? Also keep in mind that when you run your code in codepen edit mode, that it renders inside an iframe. You would have to view your codepen in debug mode so codepen renders without being in an iframe. So in your codepen URL you would change /pen/ to /debug/ If you still see the behavior difference than you can at least narrow down your issue isnt that your code is being run through an iframe. Which can cause render and functional problems sometimes when viewing in codepen.
  2. Safari bug: _next & _prev

    Hello @ryanpwaldon and welcome to the GreenSock Forum! That will be pretty hard to debug without code we can test in an editable environment like codepen. Here is a page on how to create a codepen demo example: https://www.youtube.com/watch?v=g13vpXbs34I But here are 2 codepen examples of a different approaches to a GSAP typewriter effect: And a slightly different way to do a typewriter effect in GSAP: Happy Tweening!
  3. Off-Topic: super weird Safari rendering bug

    You might want to add $(window).bind("load") within your $(document).ready(). Since the ready() event only deals with checking if the DOM is ready for the document tree node, and doesn't check for the window load event for the window tree node for images being fully loaded. This way it checks for the window load event making sure all assets like images, links, stylesheets, fonts, etc.. are fully loaded, which is different than document ready() event for the DOM. This way you can make sure its not a DOM ready along with window load event issue. As best practice i always do the following to make sure I only animate when DOM is ready and window is fully loaded, especially when i use image. But even if this doesn't solve your problem its always best to only animate when everything is loaded so you get consistent loading of your project cross browser, especially when you are animating images.. jQuery way: // wait until DOM is ready $(document).ready(function(){ // wait until window is loaded for all external assets like images, fonts, scripts, stylesheets, etc $(window).bind("load", function(){ // custom animation code goes here }); }); Even if the window is fully loaded before the ready() event, it will fire immediately when the ready event is fired. This way you ensure that both are fired in the right order due to server waiting times and other network shenanigans. Or native vanilla JS way: // wait until DOM is ready document.addEventListener("DOMContentLoaded", function(event) { // wait until window is loaded for all external assets like images, fonts, scripts, stylesheets, etc window.addEventListener("load", function(event) { // custom animation code goes here }, false); }); Happy Tweening
  4. Off-Topic: super weird Safari rendering bug

    To me this looks like all the assets aren't loaded yet before they are trying to animate. I only saw this on iOS (11.2.1) IPAD in Safari and Chrome. Have you tried to only trigger the tweens and timeline after the window is loaded and the DOM is ready? ( This way all images have been loaded into memory and the DOM tree is fully built before animating )
  5. Scale with text shaking the div

    From what i see, this is happening in Chrome. Firefox has very slight non-noticeable shake, but still looks smooth. But Chrome seems to be shaking much more like a wobbly wave. But i think this is more of an issue with first setting up the elements and markup with all right transform supported CSS. I was able to stop the shaking in Chrome, but i had to remove your initial inline transform with subpixel values on your nested div tag, along with adding some other transform supported CSS properties. But was taking too long to debug.
  6. Hello @twentytwo-jase and Welcome to the GreenSock Forum! Sorry your having an issue! We have some questions so we can help you better: What browsers is this in? What browser versions is this in? What operating system is this in? Thanks!
  7. Prevent GSAP from transforming my transforms into matrix()

    Pretty sweet and simple viewport units to pixel conversion function Jack ( @GreenSock )
  8. Will you drop legacy browsers?

    What.. no more IE8 support coming soon. But I love IE, I was just getting used to the no more IE6 being supported. (that was a joke, good riddance)
  9. Split text confused

    Hi again @anotheruser and welcome to the GreenSock Forum! If you want to keep your existing HTML markup, you would have to also target that .text-container child <div> tag as well. Meaning another instance of splitText OR just use the SplitText target parameter to tell GSAP the CSS selector to use for targeting your .text-container children. Allow GSAP to target the elements with a CSS selector and don't use getElementsByClassName(). var mySplitText = new SplitText(".text-container > div", { type: "lines" }), splitTextTimeline = new TimelineLite(); splitTextTimeline.staggerFrom(mySplitText.lines, 1, { x: 800 }, 2); With a CSS selector like .text-container > div Happy Tweening Resources: SplitText Docs: https://greensock.com/docs/Utilities/SplitText
  10. Split text confused

    This is happening because you have an extra <div> tag inside your .text-container <div> tag. Otherwise you would have to target the child <div> tag in your .text-container element. <!-- i removed the style atribute so you can see the html markup in this code block --> <!-- you have this with nested child wrapped around 'home-friend' text --> <div>HI welcome <div>home friend</div></div> <!-- should be this so you have all text without that extra div tag --> <div>HI welcome home friend</div> Just remove that extra <div> tag and SplitText will split the way you want. Happy Tweening! :0
  11. Hello Fellow GreenSockers, Well its that time again, The Mighty @Carl has just made and posted another great video tut about: Easy SVG Drag & Drop with GreenSock Draggable Keep in mind if you haven't done already please subscribe to the GreenSock Learning YouTube Channel so you don't miss out on this goodness. https://www.youtube.com/channel/UCFPckx3BFK_GvJag82CjDlg And here are the codepen to boot: Happy Tweening
  12. Swap 2 or more SVG elements

    Hello @Massimiliano Aprea and welcome to the GreenSock forum! As far as making sure your animations pause when you switch browser tabs. You can always use the HTML5 Visibility API, so when you switch tabs you can trigger a pause on your tween(s) or timeline. And then resume the tween or timeline when you give the active tab focus. Like in this example which pauses the animation when you focus out of a browser tab, and then when you give the tab focus again it will resume the animation. Keep in mind that the example also checks for when browser window is focused in and out since that doesn't use the HTML Visibility API, which only works with browser tabs not un-docked browser windows. Also Like @OSUblake advised we can help you better if you provide a reduced codepen demo example so we can see your code in context in and editable environment. Happy Tweening!
  13. Minor problem only in chrome

    Hello @mackay2588, and welcome to the GreenSock forum! When i go to your page I got redirected like @Carl did. Thanks @OSUblake for providing the right link. But when i go to the right link I see errors first thing in the browser console. jquery.mobile.js:3337 Uncaught TypeError: Cannot read property 'concat' of undefined at jquery.mobile.js:3337 at jquery.mobile.js:3814 at jquery.mobile.js:22 at jquery.mobile.js:22 jquery.min.js:2 jQuery.Deferred exception: Cannot read property 'top' of undefined TypeError: Cannot read property 'top' of undefined at animateDiv (https://mackay2588.github.io/scripts/randomMove.js:31:33) at HTMLDocument.<anonymous> (https://mackay2588.github.io/scripts/randomMove.js:9:9) at l (https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js:2:29375) at c (https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js:2:29677) undefined jquery.min.js:2 Uncaught TypeError: Cannot read property 'top' of undefined at animateDiv (randomMove.js:31) at HTMLDocument.<anonymous> (randomMove.js:9) at l (jquery.min.js:2) at c (jquery.min.js:2) dbLogoB&W.png:1 GET https://mackay2588.github.io/dbLogoB&W.png 404 () You might want to also handle those console errors. But like Blake advised above you might want to use x (translateY) instead of using top. And reduce the amount of animated elements. I have also seen with that particles.js library being a great resource hog, especially on mobile draining my battery. Just my two cents
  14. Hi @Pete Barr Are you making sure all images are loaded before animating them. Meaning only run your GSAP or any JS code once the DOM is fully ready and teh window is loaded to prevent jank. For example: // wait until DOM is ready document.addEventListener("DOMContentLoaded", function(event) { // wait until all images, links, CSS stylesheets, media assets, and fonts are loaded window.addEventListener("load", function(event) { // place custom JS code here }, false); }); But for better help I would recommend you share a limited codepen example so we can test without shooting blanks. Happy Tweening
  15. Hi @Pete Barr and Welcome to the GreenSock Forum! You can also try running your SVG code through this online SVG Optimizer, which can help clean up SVG code that might be causing an issue. https://jakearchibald.github.io/svgomg/ Happy Tweening!