Jump to content
Search Community

Nik

Members
  • Posts

    2
  • Joined

  • Last visited

Nik's Achievements

0

Reputation

  1. Hi Shaun, thanks a bunch for the pointer. I was really hoping there was a way to handle everything like that.
  2. Hi, I've got a jQuery function which toggles a CSS div between two states. The function looks like this - $('#block2').click(function(){ $(this).toggleClass("expanded"); $('#content2').toggleClass("visible"); } When you click the DIV it will change the class dictating the size of the div, as well as making the div's contents visible. The problem is that using CSS transitions to do this is extremely slow, doesn't animate well and interacts strangely with the other divs on the page. I really want to rewrite this function so that GSAP can handle the animation. How would I go about doing this? I've pasted the code I'm working with into a Codepen to give a better idea of what I'm working with. For some reason, the "visible" class toggle doesn't work on Codepen despite working locally. http://codepen.io/anon/pen/KVqxvK
×
×
  • Create New...