Page 1 of 2

On scroll event

Posted: Tue Jul 30, 2013 9:48 am
by Manuel Menéndez Román

Hello,
I've set an on scroll event of one of my pages to show an alert message, but it's never beign shown. There's also no error in console so it seems on scroll event is never beign fired.

How does this event work?

Thanks


On scroll event

Posted: Tue Jul 30, 2013 10:09 am
by Maryna Brodina

Hello! Please install app on device and test. Let us know about result.


On scroll event

Posted: Tue Jul 30, 2013 10:50 am
by Manuel Menéndez Román

Also no alert on device


On scroll event

Posted: Tue Jul 30, 2013 10:52 am
by Maryna Brodina

Please give us your public app link and tell what device/version you use to test.


On scroll event

Posted: Tue Jul 30, 2013 11:00 am
by Manuel Menéndez Román

http://appery.io/app/mobile-frame?src...

I'm testing on a samsung galaxy ace with android 2.2.1 and also on a lg optimus with android 4.0.3


On scroll event

Posted: Tue Jul 30, 2013 11:06 am
by Maryna Brodina

Thank you! We'll test and update.


On scroll event

Posted: Tue Jul 30, 2013 11:36 am
by Maryna Brodina

Sorry, could you clarify on what page you use this event, how we can reproduce this problem?


On scroll event

Posted: Tue Jul 30, 2013 11:50 am
by Manuel Menéndez Román

I've just set this event on newUser page. You can see this page clicking on the "nuevo usuario" button (reload the testing page since I just made this change)


On scroll event

Posted: Tue Jul 30, 2013 1:59 pm
by Maryna Brodina

Working on it...


On scroll event

Posted: Tue Jul 30, 2013 4:13 pm
by Kateryna Grynko

Hi Manuel,

Scroll event doesn't fire for page. Instead, you need to use the events scrollstart, scrollstop (http://api.jquerymobile.com/category/...) but these events won't work on device also.

You should use them for window. Create JavaScript asset with the following code:code$(window).on({
scrollstop: function() {
if ($.mobile.activePage.attr("dsid") == "newUser") { //use this code only for screen with name "newUser"
alert("scroll");
}
}
});/code