+ 2

The '++' operator isn't working for me

When you click the div it supposed to expand until a certain size. You can click again while it's expanding to contract it(sorry if my English is wrong) and it will return to the original size. According to the system the problem is in line 8 of js but I can't figure out what. https://code.sololearn.com/W574qWN5946o/?ref=app

8th Jan 2018, 11:16 AM
Haziq Hairil
Haziq Hairil - avatar
6 odpowiedzi
+ 12
remove this line... selected=1;
8th Jan 2018, 11:24 AM
Md. Nafis Ul Haque Shifat
Md. Nafis Ul Haque Shifat - avatar
+ 11
https://code.sololearn.com/W2QVsQjaQl7e/?ref=app updated to reflect question requirements. ** updated to include size limits
8th Jan 2018, 11:52 AM
jay
jay - avatar
+ 10
also animate is a protected word. rename it. I would also separate animate and resize function, but that's me.
8th Jan 2018, 11:48 AM
jay
jay - avatar
+ 6
It's only one way to go about this :) probably not even the best way. Just use it as a reference, if you get stuck again. There are probably other 'cleaner' methods to accomplish your task
8th Jan 2018, 2:31 PM
jay
jay - avatar
+ 1
You kind of completed it for me jay although that's not what I really wanted, but thanks anyway.
8th Jan 2018, 2:12 PM
Haziq Hairil
Haziq Hairil - avatar