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

Your preferred username that is used when logging in.

External Link to scrollable div Created Dec 11, 2009

This thread is solved

Views: 1570     Replies: 3     Last reply Mar 12, 2010  
You must login first before you can use this feature

freshmint

Posts: 13

Registered:
Nov 11, 2009

External Link to scrollable div

Posted: Dec 11, 2009

I realize this has been addressed on the forum but I have yet to find a simple example (ie: painfully simple for a noob) on how to link to a div inside a scrollable from another page. I have a very basic 4 div scrollable and would like to link to each div from a sub page ... my init code is as follows


$(document).ready(function() {
	// select #flowplanes and make it scrollable. use circular and navigator plugins
	$("#flowpanes").scrollable({size: 1, clickable: false}).circular().navigator({
		// select #flowtabs to be used as navigator
		navi: "#flowtabs",
		// select A tags inside the navigator to work as items (not direct children)
		naviItem: 'a',
		// assign "current" class name for the active A tag inside navigator
		activeClass: 'current'
	});
});

Any help would be great. Ive treid all the examples already covered in the form with no luck whatsoever

shaitiger

Posts: 5

Registered:
Mar 11, 2010

Anyone?

Posted: Mar 11, 2010

Reply to: External Link to scrollable div, from freshmint
I'm wondering the same thing. Any help would be much appreciated. Thanks

Nilpo
Visit the Windows Guru! http://www.nilpo.com http://www.windowsscript.com

Posts: 5

Registered:
Mar 12, 2010

» External Link to scrollable div

Posted: Mar 12, 2010

Reply to: External Link to scrollable div, from freshmint
You need to use the setPage() method to load a specific scrollable item by its zero-based numeric index. You can pass this into your page using PHP and a GET or POST request. Please keep in mind that this is a basic example and doesn't provide any error handling or sanitizing.

$(document).ready(function() { 
    // select #flowplanes and make it scrollable. use circular and navigator plugins 
    $("#flowpanes").scrollable({size: 1, clickable: false}).circular().navigator({ 
        // select #flowtabs to be used as navigator 
        navi: "#flowtabs", 
        // select A tags inside the navigator to work as items (not direct children) 
        naviItem: 'a', 
        // assign "current" class name for the active A tag inside navigator 
        activeClass: 'current' 
    }).setPage(<?php echo $_REQUEST['page']; ?>); 

You could then access the third item in your list with a link like this:

mypage.php?page=2

freshmint

Posts: 13

Registered:
Nov 11, 2009

Thanks... one last thing

Posted: Mar 12, 2010

Reply to: » External Link to scrollable div, from Nilpo
Thanks for the info... one last question, will this method work if the JS code is being loaded from an external file or does the php need to be on the actual page?