The jScrollPane call should be synchronous i.e. it should have finished
all it does directly after you've called the function. So you should be
able to just call your other javascript on the next line e.g.
$('.custom-scrollpane').jScrollPane({dragMaxHeight:"11",
scrollbarWidth:"10"});
alert('done the scrollpane now do something else');
Let me know if that doesn't work for you,
Cheers,
Kelvin :)
On Fri, 11 Dec 2009 14:47:47 -0000, Jim Larking <j...@citadelsecure.com>
wrote:
> --
>
> You received this message because you are subscribed to the Google
> Groups "jscrollpane" group.
> To post to this group, send email to jscro...@googlegroups.com.
> To unsubscribe from this group, send email to
> jscrollpane...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/jscrollpane?hl=en.
>
>
Thanks for that. It does seem to be working as you have suggested. I
had been trying to do it with an if statment like this:
if($('.custom-scrollpane').jScrollPane({dragMaxHeight:"11",
> scrollbarWidth:"10"})){
dosomething();
}
so i guess that bypassed the synchronous effect of the script as it
wasn't quite working properly. It seemed to be an intermittent
problem depending on how fast the script executed so i'll let you know
if that hasn't fixed it in time.
thanks for your reply and thanks for the script. it is working nicely.
the project is for is for a big client so when it eventually goes live
then i'll let you know what it is (under offical secrets act at the
moment!!)
It looks like you are expecting the jScrollPane function to return a
boolean based on whether the scrollpane was initialised or something?
It will actually return the exact same as $('.custom-scrollpane') does.
Which will be an "array like" jQuery object with zero or more elements.
I'm not sure if that makes any difference to your code?
I haven't done any testing to confirm that jScrollPane is synchronious but
from what I remember of the code it should be. I'm afraid I'm really busy
at the moment so I can't do any more tests but I hope this helps you out,
Cheers,
Kelvin :)
On Mon, 21 Dec 2009 11:23:08 -0000, Jim Larking <j...@citadelsecure.com>