/[drupal]/contributions/modules/taxonomy_ticker/taxonomy_ticker_horizontally.js
ViewVC logotype

Contents of /contributions/modules/taxonomy_ticker/taxonomy_ticker_horizontally.js

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.4 - (show annotations) (download) (as text)
Sat Sep 16 21:39:38 2006 UTC (3 years, 2 months ago) by gjmjr
Branch: MAIN
CVS Tags: DRUPAL-5--1-1, DRUPAL-5--1-0, DRUPAL-5--1-2, HEAD
Branch point for: DRUPAL-5
Changes since 1.3: +5 -5 lines
File MIME type: text/javascript
Modified javascript files to work with jQuery, corrected default height of block
1 /* $Id: taxonomy_ticker_horizontally.js,v 1.3 2006/09/16 20:54:36 gjmjr Exp $ */
2 /* Code : laurent -- koumbit.net */
3
4 function startTicker(){
5 initScrolling();
6 }
7
8 function initScrolling(){
9 var scrollIntervall = (document.getElementById("scrollerClipper").style.zIndex) * 10 ;
10 document.scrollerIntervalID = window.setInterval("doScroll()", scrollIntervall);
11 }
12
13 function doScroll(){
14 var scrollPane = document.getElementById("scrollPane");
15 var crntPos = parseInt(scrollPane.style.left)
16 scrollPane.style.left = (crntPos - 1) + "px";
17
18 if(Math.abs(crntPos) >= scrollPane.scrollWidth){
19 scrollPane.style.left = "0px";
20 }
21 }
22
23 function pauseScroll() {
24 clearInterval(document.scrollerIntervalID);
25 }
26
27 function reStartScroll() {
28 var scrollIntervall = (document.getElementById("scrollerClipper").style.zIndex) * 10 ;
29 document.scrollerIntervalID = window.setInterval("doScroll()", scrollIntervall);
30 }
31
32 if (Drupal.jsEnabled) {
33 $(document).ready(startTicker);
34 }

  ViewVC Help
Powered by ViewVC 1.1.2