Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Web and WebWorks Development

Reply
Contributor
JeffOber
Posts: 46
Registered: ‎05-03-2011
My Device: 9930, PlayBook
My Carrier: Verizon

Cross-browser scroll position

I am using jQuery to develop my application. I don't think that jQuery's scrollTop method is compatible with the OS 5 browser, where $(window).scrollTop() always returns 0 (at least, in navigation mode it does).

 

Is there a cross-bb-browser method of determining the scroll distance, in pixels, from the top of the page? 

Please use plain text.
BlackBerry Development Advisor
tneil
Posts: 3,708
Registered: ‎10-16-2008
My Device: Z10
My Carrier: Rogers

Re: Cross-browser scroll position

Yeah BB5 has a problem getting the scroll position.. but it can set the scrollTop.. I know.. Wierd...

 

You could try out an extension I made a while ago where you can subscribe to an event that will trigger when the scrolling stops that will give you the horizontal and vertical position

 

https://github.com/blackberry/WebWorks-Community-APIs/tree/master/Smartphone/Screen

Tim Neil
Director, Application Platform & Tools Product Management
Follow me on Twitter
Please use plain text.
Contributor
JeffOber
Posts: 46
Registered: ‎05-03-2011
My Device: 9930, PlayBook
My Carrier: Verizon

Re: Cross-browser scroll position

Thank you. I will take a look at that.
Please use plain text.
Contributor
samdanishaik
Posts: 30
Registered: ‎02-05-2013
My Device: 9860
My Carrier: Vodafone

Re: Cross-browser scroll position

Hi,

 

I am facing the same issue on BB10 webworks application.

 

Is there a solution for the same?

 

Thanks in advance.

Please use plain text.