javascript - Animation of swing div is being affected by other divs -
javascript - Animation of swing div is being affected by other divs -
i'm using trying implement swinging effect on hover , working when add together different effects other elements, effect getting affected!
<!-- code brakes swing--> <div id="abc"> <a href="#" title="social cause" onmouseout="mm_swapimgrestore()" onmouseover="mm_swapimage('litter','','images/abc2.png',1)"><img src="images/abc1.jpg" width="203" height="311" id="litter"></a> </div>
css:
#litter { position: absolute; left: 483px; top: 0px; width: 203px; height: 380px; z-index: 1; }
js
function mm_swapimgrestore() { //v3.0 var i, x, = document.mm_sr; (i = 0; && < a.length && (x = a[i]) && x.osrc; i++) x.src = x.osrc; } function mm_swapimage() { //v3.0 var i, j = 0, x, = mm_swapimage.arguments; document.mm_sr = new array; (i = 0; < (a.length - 2); += 3) if ((x = mm_findobj(a[i])) != null) { document.mm_sr[j++] = x; if (!x.osrc) x.osrc = x.src; x.src = a[i + 2]; } }
heres fiddle swinging properly! http://jsfiddle.net/9eceztyk/
javascript html css css-animations
Comments
Post a Comment