I am using Jquery to make an image scroll across my page horizontally. The only problem is that it uses a serious amount of cpu usage. Up to 100% on a single core laptop in firefox. What could cause this???
Jquery
<script>
jQuery(document).ready(function() {
$(".speech").animate({backgroundPosition: "-6000px 0px"}, 400000, null);
});
</script>
CSS
.speech {
/*position:fixed;*/
top:0;
left:0px;
height:400px;
width:100%;
z-index:-1;
background:url(/images/speech.png) -300px -500px repeat-x;
margin-right: auto;
margin-left: auto;
position: fixed;
}
HTML
<div class="speech"></div>