Closed piotrhajduga closed 9 years ago
Also, after watching the episode about the javascript for the Clients section I refactored the code and removed a looooooot of jquery mumbo-jumbo :)
The code now is based on semi-global position
variable that stores the current position. And there is one function setActiveClient
that uses this variable to set the proper classes on proper elements. All in one place, DRY :)
Reference http://api.jquery.com/jQuery.when/ - I added chaining of actions for showing/hiding work-container. Now the belt is slided only after the work-container is shown/hidden.
It may not be visible at first, but I thought it showcases nicely how you can chain actions whenever needed :)