John Hajewski
Posts: 0
Joined: Wed Feb 13, 2013 1:16 am

page load area?

where do I find this "page load" area? I am trying to center an image and i found the code on this forum... but i don't know where to enter it. .."more properties?" I don't see "load screen" in the events area...

maxkatz
Posts: 0
Joined: Fri Aug 13, 2010 3:24 pm

page load area?

You need to use page load even (in Events tab).

Ellen Schlechter
Posts: 0
Joined: Sun Aug 31, 2014 3:28 am

page load area?

Is there a way that when the page loads, it is already scrolled just a little bit. Similar to iOS apps made by apple, I want my search bar to be "under the header" when the page loads, then if a user scrolls up, they can see it.

Yurii Orishchuk
Posts: 0
Joined: Fri Feb 14, 2014 8:20 am

page load area?

Hi Ellen,

Yes you can use following JS code on event you need:

pre

document.body.scrollTop = 100;

/pre

Regards.

Ellen Schlechter
Posts: 0
Joined: Sun Aug 31, 2014 3:28 am

page load area?

I added that to a page load event and it didn't change anything.

Alena Prykhodko
Posts: 0
Joined: Tue Apr 09, 2013 7:36 am

page load area?

Any error in console?

Ellen Schlechter
Posts: 0
Joined: Sun Aug 31, 2014 3:28 am

page load area?

No error.

Yurii Orishchuk
Posts: 0
Joined: Fri Feb 14, 2014 8:20 am

page load area?

Hi Ellen,

It's not correct to use this code on "page load" event cause of page not displayed yet. Use "page show" instead.

Regards.

Ellen Schlechter
Posts: 0
Joined: Sun Aug 31, 2014 3:28 am

page load area?

Still didn't work.

Yurii Orishchuk
Posts: 0
Joined: Fri Feb 14, 2014 8:20 am

page load area?

Okay,

Try use it with some delay:

pre

var onDelay = function(){

Code: Select all

document.body.scrollTop = 500; 

};
window.setTimeout(onDelay, 1000);

/pre

Regards.

Return to “Issues”