Note that there are some explanatory texts on larger screens.

plurals
  1. POJquery Loading problem on first load / hard refresh
    primarykey
    data
    text
    <p>hey everyone, here is the site SEE BELOW</p> <p>I have a slight jquery problem and I cant seem to figure out how to debug it.</p> <p>the strip of thumbnails is supposed to scroll when you hover over it. When the page loads, or it loads on a hard refresh, they dont scroll.</p> <p>If I refresh the page (normally, not a hard refresh), it works fine.</p> <p>Any ideas?</p> <p>----------------UPDATE-------------------</p> <p>Here is a clean version with no other code in the way:</p> <p><a href="http://jasonmeyers.net/dev/test/" rel="nofollow noreferrer">Link here</a></p> <p>And Here is the JS Code I am using to produce the scroll</p> <p>See the second half for the code that makes it scroll.</p> <pre><code> $(document).ready(function() { $('#slideshow').cycle({ fx: 'fade', next: '#next', pause: 1, prev: '#prev', pause: '#pause', pager: '.thumbs', pagerClick:function(zeroBasedSlideIndex, slideElement) {$(slideElement).find('div.cover').hide();}, pagerAnchorBuilder: function(idx, slide) { var src = $('img',slide).attr('src'); //Change height of thumbnail here return '&lt;li&gt;&lt;a href="#"&gt;&lt;img src="' + slide.src + '" width="75" /&gt;&lt;/a&gt;&lt;/li&gt;'; // return '&lt;li&gt;&lt;a href="#"&gt;&lt;img src="' + src + '" height="90" /&gt;&lt;/a&gt;&lt;/li&gt;'; } }); $(function() { //Pause slideshow on page load $("#slideshow").cycle('pause'); }); //Get our elements for faster access and set overlay width var div = $('div.sc_menu'), ul = $('ul.sc_menu'), ulPadding = 15; //Get menu width var divWidth = div.width(); //Remove scrollbars div.css({overflow: 'hidden'}); //Find last image container var lastLi = ul.find('li:last-child'); //When user move mouse over menu div.mousemove(function(e){ //As images are loaded ul width increases, //so we recalculate it each time var ulWidth = lastLi[0].offsetLeft + lastLi.outerWidth() + ulPadding; var left = (e.pageX - div.offset().left) * (ulWidth-divWidth) / divWidth; div.scrollLeft(left); }); }); </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload