Pepi1 Posted September 10, 2017 Report Share Posted September 10, 2017 Dobar dan,dobio sam zadatak da napravim javascript animaciju koja koristi jquery...Treba da napravim 4 objekta od kojih jedan na klik menja velicinu dok drugi prelaskom misa menja boju...Kada bu neko mogao da mi neko bio u mogucnosti da mi pomogne bilo bi super! Link to comment Share on other sites More sharing options...
Jee Posted September 10, 2017 Report Share Posted September 10, 2017 http://api.jquery.com/animate/ Link to comment Share on other sites More sharing options...
h8er Posted September 11, 2017 Report Share Posted September 11, 2017 Za menjanje boje ti je potreban i jquery UI. https://jsfiddle.net/5Lcfgjc0/2/ Link to comment Share on other sites More sharing options...
vili Posted September 13, 2017 Report Share Posted September 13, 2017 Ufff... ja bih izbegao jquery-ui po svaku cenu Nekada davno je bio zgodan, ali ga je vreme pregazilo (i ne govorim o sebi ;)) Link to comment Share on other sites More sharing options...
Jee Posted September 13, 2017 Report Share Posted September 13, 2017 Naravno ali momak je postavio pitanje i dobio odgovor. Animation quick tips: - Koristiš Velocity.JS ili GSAP biblioteke. Velocity je dosta bolji od jQuery-a, GSAP je mnogo, mnogo bolji. - Ne animiraš height osim ako apsolutno moraš. - Ako radiš za mobile ne animiraš height. - Ako nešto pomeraš radi to sa transformom ne sa x/y koordinatama. - Ako animiraš više parametara poželjno ih je sve offsetovati sa malim delay-em zarad optimizacije. - Nemoj nikada imati X animacija odjednom (da znam da demo to pokazuje ali u praksi...) - Ako animiraš nešto preko JS-a nemoj koristiti i CSS tranzicije Vili, sve okej❓ Link to comment Share on other sites More sharing options...
vili Posted September 30, 2017 Report Share Posted September 30, 2017 @Dzi Procitaj ponovo moj komentar - nije se odnosio na jquery, nego na jquery-UI ;) Link to comment Share on other sites More sharing options...
kobayashi Posted November 3, 2017 Report Share Posted November 3, 2017 Ako se koristi i Angular, onda umesto jquery-ui može PrimeNG https://www.primefaces.org/primeng/#/ Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now