Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums JavaScript jQuery slide Re: jQuery slide

#82394
Mottie
Member

Hi Chris!

I think part of the problem is the urlFragment. It’s defined using `location.hash.substring(2)` but the url is `http://chrisburton.me/dev/page:2`; there is no hash! Maybe you can try `location.href.split(‘:’)[2]` to get just the page number.

Also in the success function, `if(0 > $(‘a[href=”‘ + urlFragment + ‘”]’).length){` will always be false. Writing stuff backwards like that always messes me up though LOL. I leave that kind of stuff to Google’s closure compiler.

I didn’t dig deep enough to figure out how you know what articles are showing, or how you know you’re on the last page so I can’t tell you how to make the slider stop, just yet ;)