+ 2

Need help with jquery..

the animate function is waiting the amount of time I set before changing the width rather than animating throughout the number of seconds given. ex: $("#example").click(function(){ div.animate({ width: '+=100px' }, 1000);. // <-- this line here });

18th Jun 2018, 10:00 PM
Brent
Brent - avatar
11 ответов
+ 2
D'lite d' Scorpio it didn't help any sadly :/ plus in the jQuery effects section under animate, it teaches the lesson using px. thanks for the help though :)
18th Jun 2018, 10:31 PM
Brent
Brent - avatar
+ 2
the best way to solve this is to add a transition property to the element you are animating in css. that would fix it.
18th Jun 2018, 10:50 PM
Peter Claver
Peter Claver - avatar
+ 1
Brent ,please post a link to this your code
18th Jun 2018, 10:41 PM
Dlite
Dlite - avatar
+ 1
I figured it out for anyone with a similar issue. I had a transition in my css that was causing the issue. simply deleting that fixed the problem. programming can be so picky lol.
18th Jun 2018, 11:09 PM
Brent
Brent - avatar
+ 1
D'lite d' Scorpio sorry for not posting my code, I have this app on my phone but I code on my desktop.
18th Jun 2018, 11:10 PM
Brent
Brent - avatar
0
I do same
18th Jun 2018, 11:10 PM
Peter Claver
Peter Claver - avatar
0
Brent No problems
18th Jun 2018, 11:11 PM
Dlite
Dlite - avatar
0
Brent You can save your page on SL Web version and access to it on mobile also
18th Jun 2018, 11:24 PM
KrOW
KrOW - avatar
0
KrOW How do u do that
18th Jun 2018, 11:27 PM
Peter Claver
Peter Claver - avatar
0
Peter Claver In "Code Playground" section from main screen of app (the button with "{ }" )
18th Jun 2018, 11:31 PM
KrOW
KrOW - avatar
0
Name jeff...
19th Jun 2018, 2:23 AM
Briap
Briap - avatar