Hi Sebioff, I already reported it here: http://dev.jquery.com/ticket/2273
As for 'axis', the default is 'y', but in the demo
$.scrollTo.defaults.axis is set to 'xy'. That line is commented and I
expected it to be seen. I can add a message though, saying 'in this
case, axis is defaults to xy', will do it soon.
Using { top: ... } like that will work, as long as you don't set axis
to xy. I was just saying you can write it shorter.
Cheers
Ariel Flesler
On 2 feb, 19:28, Sebioff <[EMAIL PROTECTED]> wrote:
> @Olaf: Thanks, I'm doing it exactly like that now :)
>
> @Ariel:
> Well, what I do (not in this example, though) is using your scrollTo-
> Plugin in combination with the Mousehold-Plugin.
> As long as the link is clicked, the content of the div should be
> scrolled down.
> The scrolling looks a bit strange with a duration there because of the
> slow up/down of the scrolling animation...well, I didn't really check
> whether this slowing up/down can be disabled, since I got the effect I
> wanted anyway :)
>
> I guess I got the {top:'+=10px'} from the "Relative position (hash)"-
> example.
> I don't quite understand how axis:'y' can be the default...on the
> example page $(...).scrollTo( '+=100px', 800 ); scrolls both the x and
> the y axis?
>
> Now, what about the contents().height()-behaviour?
> Should it be reported as bug?
>
> On 2 Feb., 04:51, Ariel Flesler <[EMAIL PROTECTED]> wrote:
>
>
>
> > Also... :)
> > I checked the example, when using scrollTo.. if you don't specify
> > duration, it scroll instantly (if that's what you want, then that's
> > ok)
> > Also, instead of {top:'+=10px'}, it is meant to be used as:
> > $().scrollTo( '+=10px', duration, {axis:'y'})
> > Now.. axis:'y' is the default, so you don't need to specify it. so:
> > $().scrollTo( '+=10px', duration )//or no duration
> > Will be enough.
>
> > Cheers
> > Ariel Flesler
>
> > On 31 ene, 19:34,Sebioff<[EMAIL PROTECTED]> wrote:
>
> > > Uh, allright, I'm sorry...I guess I found a solution.
> > > The trick is to wrap the content in a span, and then retrieve the
> > > spans height.
> > > But still, I guess if contents().height() (which sounds so logical to
> > > retrieve the contents height, don't you think) works in Internet
> > > Explorer it should work in Firefox as well (or it shouldn't give any
> > > nasty exceptions, at least)...
>
> > > If someone got an even easier way than the span-wrapping I'd be glad
> > > to hear about!
>
> > > On 31 Jan., 22:14,Sebioff<[EMAIL PROTECTED]> wrote:
>
> > > > Hi,
> > > > i've got a div with overflow:auto.
> > > > I want to check whether the content of the div is higher than the div
> > > > itself (in order to know whether I need to show a "scrolldown" link
> > > > or not).
>
> > > > In Internet Explorer with jQuery 1.2.2. I can get the contents height
> > > > without any problem with:
> > > > $("#div").contents().height()
>
> > > > (I don't know if this is the best way to do it, but it's the only one
> > > > I found...)
> > > > The problem is, in Firefox it doesn't work and all I get is the
> > > > following error message:
>
> > > > Fehler: [Exception... "Could not convert JavaScript argument"
> > > > nsresult: "0x80570009 (NS_ERROR_XPC_BAD_CONVERT_JS)" location: "JS
> > > > frame ::http://www.rakuun.de/Stuff/Schasler/jquery-1.2.2.js::
> > > > anonymous :: line 853" data: no]
> > > > Quelldatei:http://www.rakuun.de/Stuff/Schasler/jquery-1.2.2.js
> > > > Zeile: 853
>
> > > > You can try it out yourself
> > > > here:http://www.rakuun.de/Stuff/Schasler/content_height_test.html
>
> > > > Any idea how to fix this or how to get the contents height in a way
> > > > that works in both browsers?- Ocultar texto de la cita -
>
> > > - Mostrar texto de la cita -- Zitierten Text ausblenden -
>
> > - Zitierten Text anzeigen -- Ocultar texto de la cita -
>
> - Mostrar texto de la cita -