- This topic is empty.
-
AuthorPosts
-
June 14, 2013 at 10:23 am #45535Historical Forums UserParticipant
Hey guys, [Here is the code i have problem with…](http://codepen.io/3cky/pen/harLI “Here is the code I am having trouble with”). I want to add the class “stretch” to the div with class “styled” , when the anchor tag on the left is clicked so that the animation:stretch 2s; runs once. However when the link is clicked the animation seems to stop in the middle of the run and then the anchor tag and the div disappear. I am quite new to jQuery, so please tell me what am I doing wrong. Thank you :)
June 14, 2013 at 10:33 am #138715Paulie_DMemberTry this….I’ve stripped some stuff out but the basic functionality is there.
June 14, 2013 at 10:42 am #138717Historical Forums UserParticipantBut you removed the absolute positioning which is crucial to the thing I’m trying to build as that div would have to be over all of the elements on the page, set with the highest z-index. Thanks Paulie_D, now I know that the problem might not be the jQuery code I’ve written but rather the absolute positioning.
June 14, 2013 at 10:44 am #138718Historical Forums UserParticipantThe weird part is that the animation works just fine when I put the ” animation:stretch 2s; ” rule into the .styled class and the animation works fine as well with the -webkit- vendor prefix in Chrome , but it breaks in Firefox.
June 14, 2013 at 11:13 am #138655Paulie_DMemberAbsolute positioning doesn’t seem to be an issue : http://codepen.io/Paulie-D/pen/EtKxB
The Codepen in FF does seems to be a mess though. I don’t know if this a a CP issue.
Is it broken on a ‘live’ site.
June 14, 2013 at 12:36 pm #138724Historical Forums UserParticipantYep , I made locally html , css and .js files , made sure that jquery and the css file are loaded properly but the animation doesn’t work in Chrome 27 , FF 21 or IE10. :(
June 14, 2013 at 1:25 pm #138728Paulie_DMemberWe’d really need to see it on a live page. My Codepen works in Chrome but not in FF.
June 14, 2013 at 4:00 pm #138742Historical Forums UserParticipant[Here is a live link](http://3cky.com/animate/index.html “Here is a live link”)
June 15, 2013 at 4:37 am #138804Historical Forums UserParticipantTurned out that I was loading my functions before I had loaded jQuery. Now everything works fine. Paulie_D thank you for the help. I really appreciate it :)
-
AuthorPosts
- The forum ‘CSS’ is closed to new topics and replies.