Az alábbit a head-ba:
Kód:
<script src="hxxp://remysharp.com/demo/jquery-1.2.6.js" type="text/javascript"></script>
<script src="hxxp://remysharp.com/downloads/jquery.marquee.js" type="text/javascript"></script>
<script type="text/javascript">
<!--
$(function () {
$('marquee').marquee('pointer').mouseover(function () {
$(this).trigger('stop');
}).mouseout(function () {
$(this).trigger('start');
}).mousemove(function (event) {
if ($(this).data('drag') == true) {
this.scrollLeft = $(this).data('scrollX') + ($(this).data('x') - event.clientX);
}
}).mousedown(function (event) {
$(this).data('drag', true).data('x', event.clientX).data('scrollX', this.scrollLeft);
}).mouseup(function () {
$(this).data('drag', false);
});
});
//-->
</script> Ez pedig maga a marquee
HTML kód:
<marquee behavior="scroll" direction="left" scrollamount="2" width="350">Szöveg</marquee>
úgy állítod be ahogy a marquee-t alapból kell, A többit a jquery elintézi.
A linkelt js-eket lehetőleg töltsd majd le, nem illik más oldaláról behívni.