help me, programmers!!
- Started
- Last post
- 14 Responses
- janne76
$(".label").click(function() {
if($(this).hasClass("highlight... {
$(this).removeClass("highlight...
$(".contents:visible").slideUp... reinitialiseScrollPane);
$(".loader").empty();
} else {
$(".label").removeClass("highlig...
$(".contents:visible").slideUp...
$(this).addClass("highlight");
$(".highlight + .contents").slideDown("slow", reinitialiseScrollPane);
$(".scroll-pane")[0].scrollTo...
}
});this is the tricky bit:
---
$(".highlight + .contents").slideDown("slow", reinitialiseScrollPane);
----reinitialiseScrollPane apparently can only be passed as a parameter, not as a function or anything else..
what i need to do is have the scrollpane be reinitialised prior to the next line( the next jquery function): as in this needs to be done first before it can scroll to the right position.i tried everything, a timer function worked on safari and ff on the mac, but didn't work at all on IE on the pc.. i found a pause function, no luck either.
queueing didn't work..and moving the parameter one function up didn't work either, as the reinitialisation takes a little too long.
it scrolls before the scrollpane was reinitialised.
any other ideas?
- janne760
oopsy, qbn ate bits from my code, but not the vital parts, fortunately..
- Llyod0
you need to put the doohicky inside the recursive loop
- janne760
^
- heavyt0
yeah, make new function that does the init, then have it call the scrollto part.
if you put it up on pastebin, i am sure one of us will be glad to fix the code for you.
- janne760
oh, just drop it inside another function? why did i not think of this before?
http://pastebin.com/m23c324d0
if anyone would.. yer welcome..cheers!
- heavyt0
ok, just posted a crack at it, just delaying the scroll.
i wasnt sure how long youd need, so i set it to 2500ms
- janne760
doesn't work. :(
but thanks anyway.. the function doesn't get called at all..
- janne760
answer you cunt!!!!
- janne760
i need something like 'supersimplescrollpane' :/
- heavyt0
so, does it reinit the scrollpane? hard to tell what the problem is until we really know where it is getting messed up.
are there any JS errors popping up?
- janne760
hmmm.. no errors.. you got chat/mail?
- janne760
aye.. :)
- janne760
thanks, heavyt. :)