/ Published in: jQuery
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
$(document).ready(function(){ var div_pics_top_css = { 'position':'absolute', 'top':'13px', 'left':'343px', 'height':'80px', 'width':'450px', 'background':'url(/images/all.jpg) repeat-x 0px 0px ' } $('div#pics_top').css(div_pics_top_css); setInterval ("move_gall()", 33); }) function move_gall(){ var b = $('div#pics_top').css('background').replace(/px/gi,'').split(' '); var l_pos = String(b[b.length-2]-1)+'px' $('div.pics_top').css('background-position',l_pos) }