You will recieve your password to this address. Address is not made public.

Your preferred username that is used when logging in.

seekTo(4) sometimes reverts to (0) Created Aug 13, 2010

This thread is solved

Views: 1540     Replies: 2     Last reply Aug 22, 2010  
You must login first before you can use this feature

oistylin

Posts: 2

Registered:
Aug 13, 2010

seekTo(4) sometimes reverts to (0)

Posted: Aug 13, 2010

Hello-

I am using scrollable for navigation on WP, and need it setup so if there is a post it goes to the blog(4). It usually starts off scrolling to 4 but occasionally turns around and head back to home(0).

I put this in the header, incase it was a load sequence issue:

<script>
$(function() {
	$("#flowpanes").scrollable({ circular: false, mousewheel: false }).navigator({
		navi: "#drop",
		naviItem: 'a',
		activeClass: 'current',
		easing: 'swing',
		speed: 1000,
		history: true
	});
});
</script>

And followed up with this in the footer:

<?php if (is_single()) : ?>
<script>
$(window).load(function() {
var api = $("#flowpanes").data("scrollable");
api.seekTo(4, 2000);
});
</script>
<?php endif; ?>

Any help or ideas you can give at all would be greatly appreciated. Trying to get it so when users are linked to the site they end up on the blog post they were sent to, not the home page.

markking

Posts: 1

Registered:
Aug 22, 2010

» seekTo(4) sometimes reverts to (0)

Posted: Aug 22, 2010

Reply to: seekTo(4) sometimes reverts to (0), from oistylin
I have never had a problem using a hard coded number, in this case number 4. BUT I did run into a problem when I tried to use a js string variable (example : '4')

api.seekTo('4', 2000); will not work.

api.seekTo(4, 2000); will work.

You could also try api.move(4); which should move the scroller 4 places forward from the current location.

oistylin

Posts: 2

Registered:
Aug 13, 2010

» » seekTo(4) sometimes reverts to (0)

Posted: Aug 22, 2010

Reply to: » seekTo(4) sometimes reverts to (0), from markking
I actually figured out what the cause was, still not fixed how I would like but better.

I turned off the browser history, and it no longer reverts back to the home... would love to have the history on as well but I am picking my battles :)

-Thanks