Reply LinkBack Thread Tools Search this Thread
Old 12-03-2010, 10:55   #21 (permalink)
pob
Senior Member
 
pob's Avatar
 
Join Date: Dec 2004
Location: Brighton
Posts: 1,044
Send a message via MSN to pob
Quote:
Originally Posted by bazzle
yes, that's the bugger.

Thanks for that. I'm gonna rip that site apart now and work out how they did it.

looks gash if you ask me and surly it just a fixed div?
  Reply With Quote
Old 12-03-2010, 11:00   #22 (permalink)
bazzle
Don't touch my tea!
 
bazzle's Avatar
 
Join Date: Aug 2007
Posts: 1,723
Send a message via MSN to bazzle
The whole website looks gash if you ask me, and I'm trying to work out the how the button links you to the next item rather than how the buttons themselves are positioned.
__________________
  Reply With Quote
Old 12-03-2010, 11:36   #23 (permalink)
gabrield
Registered User
 
gabrield's Avatar
 
Join Date: May 2008
Location: Montreal, Quebec
Posts: 36
I don't know too much about Javascript, but can't you just have a variable that memorize in which section you are (0,1,2,3,...) and when you click up, Javascript scroll to the previous section, and then change the variable.

For example (this isn't real code, just an idea)
Code:
var section = 1; nextbutton.onclick () { scrollto(section+1); section++; } previousbutton.onclick() { scrollto(section-1); section--; }

If you could "translate" that to Javascript, in combination with what was posted previously, I guess you have what you're looking for.
  Reply With Quote
Old 12-03-2010, 13:54   #24 (permalink)
bazzle
Don't touch my tea!
 
bazzle's Avatar
 
Join Date: Aug 2007
Posts: 1,723
Send a message via MSN to bazzle
Thanks, that looks like it might work, wouldn't know how to make it work though.

If I could code javascript then I would be sorted but unfortunately I rely on copying snippets from the other websites.
__________________
  Reply With Quote
Old 12-03-2010, 14:53   #25 (permalink)
bslate
Senior Member
 
Join Date: Feb 2010
Posts: 124
Send a message via MSN to bslate
I know how much of a pain this can be :P Making the fixed nav scroll to an anchor link is simple. 100's of options for that. Getting to move 1 section at a time based on the current section is definitely more difficult.

Here is another example:

Crush + Lovely

They use both methods that people are talking about. Anchor scrolling (with the side nav) - but also next section scrolling if you use the keyboard. Take a look at their code, may be helpful.

I would also take a look at serial scroll again. I've used it before to scroll based on a pixel value. (-+ XX which I know you would want to avoid) But I believe its possible to scroll to the next element with a specific class name.
  Reply With Quote
Old 12-03-2010, 15:03   #26 (permalink)
gabrield
Registered User
 
gabrield's Avatar
 
Join Date: May 2008
Location: Montreal, Quebec
Posts: 36
Quote:
Originally Posted by bazzle
Thanks, that looks like it might work, wouldn't know how to make it work though.

If I could code javascript then I would be sorted but unfortunately I rely on copying snippets from the other websites.

But I just thought that if the person scrolls with scroll bars, you'd need to know in which section he now is, so you'd need to have some code to find where the user currently is.
  Reply With Quote
Old 12-03-2010, 15:05   #27 (permalink)
bazzle
Don't touch my tea!
 
bazzle's Avatar
 
Join Date: Aug 2007
Posts: 1,723
Send a message via MSN to bazzle
This is what I've got.

Code:
$(function() { var s = $('.page'); var s = 1; $('#up').click (function{ scrollto(s+1); section++; }); });


I'm close to giving in, don't really know what I'm doing.
__________________
  Reply With Quote
Old 12-03-2010, 21:57   #28 (permalink)
bjzaba
Design Student
 
bjzaba's Avatar
 
Join Date: Apr 2008
Location: Brisbane, Australia
Posts: 2,255
Let me google that for you

hiddenloop's paging_keys_js at master - GitHub

Says it uses jQuery - dunno if you can add scrolling though.
__________________
DA gallery



Last edited by bjzaba : Tomorrow at 01:51.
  Reply With Quote
Old 13-03-2010, 10:20   #29 (permalink)
delatorre
Oooeer missus!
 
delatorre's Avatar
 
Join Date: Oct 2008
Location: Nearer the gutter than the stars
Posts: 109
Did you get this sorted Bazzle? I added a smooth scroll to a page this morning using MooTools and it should only take a couple of minutes to adapt it to what you need. Linky - click the 'apply for this job' link. Let me know if it's the right kind of effect.
__________________
  Reply With Quote
Old 15-03-2010, 08:21   #30 (permalink)
bazzle
Don't touch my tea!
 
bazzle's Avatar
 
Join Date: Aug 2007
Posts: 1,723
Send a message via MSN to bazzle
Quote:
Originally Posted by bjzaba
hiddenloop's paging_keys_js at master - GitHub

Says it uses jQuery - dunno if you can add scrolling though.

Cheers mate, that's exactly what I want. Not really that bothered about smooth scrolling, although it would be nice.
__________________
  Reply With Quote
Old 15-03-2010, 08:23   #31 (permalink)
bazzle
Don't touch my tea!
 
bazzle's Avatar
 
Join Date: Aug 2007
Posts: 1,723
Send a message via MSN to bazzle
Quote:
Originally Posted by delatorre
Did you get this sorted Bazzle? I added a smooth scroll to a page this morning using MooTools and it should only take a couple of minutes to adapt it to what you need. Linky - click the 'apply for this job' link. Let me know if it's the right kind of effect.

Can't see such a link mate.
__________________
  Reply With Quote
Old 15-03-2010, 14:22   #32 (permalink)
delatorre
Oooeer missus!
 
delatorre's Avatar
 
Join Date: Oct 2008
Location: Nearer the gutter than the stars
Posts: 109
This should do what you want but it's not been tested. If you want to try it, you'll need MooTools Core and also a download of MooTools More with Fx.Scroll included. You could use Core only and switch Fx.Scroll to scrollTo.

You'll need to add #up and #down ids to the 2 arrow buttons.

Code:
window.addEvent('domready',function(){ var pages = new Array(); var pages_total; $$('.page').each(function(p, i) { pages[i] = p.getPosition().y; pages_total = i; }); var current = 0; $('up').addEvent('click', function(){ if (current > 0) { current = current-1; new Fx.Scroll(window, { offset: { 'y': pages[current] } }).toTop(); } }); $('down').addEvent('click', function(){ new Event(e).stop(); if (current < pages_total) { current = current+1; new Fx.Scroll(window, { offset: { 'y': pages[current] } }).toTop(); } }); });
__________________
  Reply With Quote
Old 16-03-2010, 11:11   #33 (permalink)
bazzle
Don't touch my tea!
 
bazzle's Avatar
 
Join Date: Aug 2007
Posts: 1,723
Send a message via MSN to bazzle
Thanks, I'll try it out.
__________________
  Reply With Quote
Old 17-03-2010, 12:15   #34 (permalink)
MiguelKnives
Registered User
 
Join Date: Aug 2008
Posts: 47
its possible I have seen several web sites like this...
  Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search


Contact Us - Web Design Forums - Archive
Web Hosting by Heart Internet, vBulletin © 2000-2009 Jelsoft Enterprises Limited.
Search Engine Optimization by vBSEO 3.0.0 RC8
Web Hosting by Heart Internet