javascript - jQuery animation on selected img working locally but not remotely -



javascript - jQuery animation on selected img working locally but not remotely -

i have next animated elements in tile (visually) rotate on z-axis... on next page...

http://sthera.com/modelos.php

and coded (a bit brute-forced, if more elegant solution come mind appreciated)...

$(window).load(function () { imagesloaded('.fixedwidth', function () { console.log("animation starting3"); var locationclean = window.location.href.split('?')[0]; var loc = locationclean.split('sthera/')[1]; //alert (loc); if (loc == 'modelos.php' || loc == 'aislar.php') { //alert ("animation starting2"); var duration = 300; var imgwidth = 123; var delayfactor = 60; var marginleft = imgwidth / 2; //establecemos los valores de inicio $(".a1, .a2, .a3, .a4, .a5, .a6, .a7").css({ 'width': '0px', 'margin-left': marginleft + 'px', 'opacity': '0' }); $(".c1, .c2, .c3, .c4, .c5, .c6, .c7").css({ 'opacity': '0' }); $(".a1").delay(1 * delayfactor).animate({ 'width': imgwidth + 'px', 'margin-left': '0px', 'opacity': '1' }, duration); $(".c1").delay(1 * delayfactor + duration).animate({ 'opacity': '1' }, duration); $(".a2").delay(2 * delayfactor).animate({ 'width': imgwidth + 'px', 'margin-left': '0px', 'opacity': '1' }, duration); $(".c2").delay(2 * delayfactor + duration).animate({ 'opacity': '1' }, duration); $(".a3").delay(3 * delayfactor).animate({ 'width': imgwidth + 'px', 'margin-left': '0px', 'opacity': '1' }, duration); $(".c3").delay(3 * delayfactor + duration).animate({ 'opacity': '1' }, duration); $(".a4").delay(4 * delayfactor).animate({ 'width': imgwidth + 'px', 'margin-left': '0px', 'opacity': '1' }, duration); $(".c4").delay(4 * delayfactor + duration).animate({ 'opacity': '1' }, duration); $(".a5").delay(5 * delayfactor).animate({ 'width': imgwidth + 'px', 'margin-left': '0px', 'opacity': '1' }, duration); $(".c5").delay(5 * delayfactor + duration).animate({ 'opacity': '1' }, duration); $(".a6").delay(6 * delayfactor).animate({ 'width': imgwidth + 'px', 'margin-left': '0px', 'opacity': '1' }, duration); $(".c6").delay(6 * delayfactor + duration).animate({ 'opacity': '1' }, duration); $(".a7").delay(7 * delayfactor).animate({ 'width': imgwidth + 'px', 'margin-left': '0px', 'opacity': '1' }, duration); $(".c7").delay(7 * delayfactor + duration).animate({ 'opacity': '1' }, duration); } }); }); //end animation() //javascript document

where .a1 ... .a7 classed images.

this code runs in local test server not remotely...

i thought problem might have images not beingness loaded time $(document).ready... ran used imagesloaded plugin recommended user... preload images jquery dominant colour of image ... didnĀ“t work though. code beingness run after images load apparently wasn't issue.

(many) in advance.

are getting console.log("animation starting3"); in console? i'm wondering if script running @ all. loc end being? see commented out alert, maybe server's url construction different local 1 , nil running because loc wrong or empty.

javascript jquery imagesloaded

Comments

Popular posts from this blog

php - Android app custom user registration and login with cookie using facebook sdk -

ruby on rails - Devise Logout Error in RoR -

c# - Create a Notification Object (Email or Page) At Run Time -- Dependency Injection or Factory -