Hi all
Is it possible to control scrolling to x number of pixels somehow?
Thanks in advance
Ulf
freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options
Hi all
Is it possible to control scrolling to x number of pixels somehow?
Thanks in advance
Ulf
freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options
In what context? In your page, or in Freeway’s design environment?
Walter
On Nov 20, 2011, at 4:25 PM, ulfr wrote:
Hi all
Is it possible to control scrolling to x number of pixels somehow?
Thanks in advance
Ulf
freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options
freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options
Hi Walter
It is my page advis - hemsida och logotype, ditt företags viktigaste kommunikationsverktyg !.
Since I use SmoothScroll and Sticker for the top items, I don’t want the page to scroll an entire browser page (as it does now) when the visitor hits the scroll button on his keyboard. Just, say 400 pxl. Or — optimally — so that the last line of text becomes the first line under the css menu bar after scrolling. Regardless of the hight of the browser window.
Ulf
On 20 Nov 2011, 8:25 pm, ulfr wrote:
Hi all
Is it possible to control scrolling to x number of pixels somehow?
Thanks in advance
Ulf
On 21 Nov 2011, 1:09 pm, waltd wrote:
In what context? In your page, or in Freeway’s design environment?
Walter
On Nov 20, 2011, at 4:25 PM, ulfr wrote:
Hi all
Is it possible to control scrolling to x number of pixels somehow?
Thanks in advance
Ulf
freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options
Hmmm. You can very easily “hook” any key press that you like, and assign your own event to it. The trick will be to get all the different ways that a person can tell the browser to page down (page down button, spacebar, arrow down) and attach your custom behavior to those key events, but at the same time not override useful key presses. (You’re inside a textarea, and you press the spacebar, and the page scrolls rather than giving you a space character in your input. I believe this bug bit the Showcase Action in its first incarnation.)
Looking over your ideals here, there’s one other thing that’s going to be difficult to pull off in the wild (remember, you don’t own the browser, your code has to adapt to however the visitor has configured her screen). If your content is made up of lots of short paragraphs within a single container element, then you could figure out where to scroll to like this:
var v = document.viewport;
var bottom = v.getHeight() + v.getScrollOffsets()['top'];
var children = $('yourContainer').select('p');
children.each(function(elm, idx){
if(elm.cumulativeOffset()['top'] > bottom){
Effect.scrollTo( children[idx -1] );
}
});
But that has lots of holes in it – what if the document is shorter than the window? How do you trap that error? What if the last page is already in view? What if each paragraph is more than a screen tall? You might end up scrolling backward. (Remember – not your browser!) That’s a lot of different contingencies to plan for and respond to gracefully. You’re probably looking at a day’s work by someone at my end of the JavaScript pool to work through the ramifications and come up with something bulletproof.
The other thing is, people have been “trained”, some for their entire lives, how the browser reacts to their input. Breaking that understanding for artistic gain is your prerogative, of course, but you should consider what you will gain and what the visitor will lose in the bargain.
Walter
On Nov 22, 2011, at 5:37 AM, ulfr wrote:
I don’t want the page to scroll an entire browser page (as it does now) when the visitor hits the scroll button on his keyboard. Just, say 400 pxl. Or — optimally — so that the last line of text becomes the first line under the css menu bar after scrolling. Regardless of the hight of the browser window.
freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options
Thanks Walter!
I think I better have the whole page scrolling exept for only a navigation bar on the left as on advis - hemsida och logotype, ditt företags viktigaste kommunikationsverktyg !.
Like you said I think people are used to have the head scrolling along with the page nowadays.
What do you think?
Ulf
freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options
That does sound a lot less complicated.
Walter
On Nov 23, 2011, at 10:15 AM, ulfr wrote:
Thanks Walter!
I think I better have the whole page scrolling exept for only a navigation bar on the left as on advis - hemsida och logotype, ditt företags viktigaste kommunikationsverktyg !.
Like you said I think people are used to have the head scrolling along with the page nowadays.
What do you think?
Ulf
freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options
freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options