PDA

View Full Version : Crawler.js problems



kenaroo
04-01-2010, 05:50 AM
http://www.dynamicdrive.com/dynamicindex2/crawler/index.htm

Hoping to get a bit of help with a problem I am having with crawler.js

The script runs, the images crawl across the screen however, I have 7 images to scroll through and hoping to add many more, my client is hoping for about 35, but at the moment, when the crawler starts it shows the first 3 images, then back to the start but then only scrolls through 6 or the 7 images. Is there a limit to the number of images that can be used?

Here is the code, the crawler.js file has not been edited at all.



<div style="position: absolute; width: 860px; height: 240px; z-index: 5; left: 20px; top: 198px" id="contentwrapper" class="style1">
<div class="marquee" id="mycrawler" style="height: 240px; width: 860px;">
<img src="graphics_img/hp1lge.jpg" />
<img src="graphics_img/hp2lge.jpg" />
<img src="graphics_img/hp3lge.jpg" />
<img src="graphics_img/hp4lge.jpg" />
<img src="graphics_img/hp5lge.jpg" />
<img src="graphics_img/hp6lge.jpg" />
<img src="graphics_img/hp7lge.jpg" />
</div>
</div>


And the code for MarqueeInit



<script type="text/javascript">
marqueeInit({
uniqueid: 'mycrawler',
style: {
'padding': '0px',
'width': '860px',
'height': '240px'
},
inc: 3, //speed - pixel increment for each iteration of this marquee's movement
mouse: 'cursor driven', //mouseover behavior ('pause' 'cursor driven' or false)
moveatleast: 3,
neutral: 150,
savedirection: true
});
</script>

jscheuer1
04-02-2010, 06:35 AM
There's virtually no limit to the number of images. You shouldn't use inline style for the id="mycrawler" division, get rid of the highlighted:


<div style="position: absolute; width: 860px; height: 240px; z-index: 5; left: 20px; top: 198px" id="contentwrapper" class="style1">
<div class="marquee" id="mycrawler" style="height: 240px; width: 860px;">
<img src="graphics_img/hp1lge.jpg" />
<img src="graphics_img/hp2lge.jpg" />
<img src="graphics_img/hp3lge.jpg" />
<img src="graphics_img/hp4lge.jpg" />
<img src="graphics_img/hp5lge.jpg" />
<img src="graphics_img/hp6lge.jpg" />
<img src="graphics_img/hp7lge.jpg" />
</div>
</div>

I tried this locally and it made the images stack, obscuring some of them. Removing that inline style fixed it. From the demo page:


Any styling to your marquee should be done via the "style" parameter



If you want more help:

Please post a link to a page on your site that contains the problematic code so we can check it out.

kenaroo
04-04-2010, 10:31 PM
Thank you, it works perfectly after removing the inline style....much appreciated.

ashwini223
07-22-2012, 04:01 AM
Hi,

I use crawler.js for image scrolling and fancy box for viewing the image in a pop up..

When we click an image, fancy box will count the image and show total images used in the scroll

My problem is I used 7 images in scroll..But becoz of crawler.js it shows as 14 images..Jus counting double..

Moreover for 1st 7 images, fancy box works perfect but if i click any images after 7 means When image is clicked, image getting opened in new browser...

Please help me...


Crawler.js code is here

http://www.dynamicdrive.com/dynamicindex2/crawler/crawler.js

jscheuer1
07-22-2012, 07:47 AM
Please start a new thread for a new question.