Skip to content
This repository was archived by the owner on Oct 8, 2021. It is now read-only.
This repository was archived by the owner on Oct 8, 2021. It is now read-only.

no event before the page is loaded #2186

Closed
@v3n3

Description

@v3n3

it would be nice to have an event triggered before a page is loaded.

For example, it can be useful for unbinding listeners in the previous page (specially in case of a multi page data like product list) or add tracking. The main advantage of using such event rather than changepage is that you can use them when you load page in background (directly using $.mobile.loadpage()).

Activity

toddparker

toddparker commented on Aug 7, 2011

@toddparker
Contributor

Could you add this issue to the feature request wiki page and link to here? We'll re-open it once we decide to work on it.

v3n3

v3n3 commented on Aug 8, 2011

@v3n3
Author

it is, in feature request > navigation > "Event before the page is loaded", i did as we asked me when we discussed #2151 (comment)

toddparker

toddparker commented on Aug 9, 2011

@toddparker
Contributor

Awesome, thanks!

jblas

jblas commented on Sep 28, 2011

@jblas
Contributor

@v3n3

Just an FYI, this landed on the HEAD. The events to listen for are pagebeforeload, pageload, and pageloadfailed. A data object is passed as the 2nd arg of a bound callback. The data for all 3 events contain an url and absUrl properties. The pageload event data contains an additional property that is the jQuery collection that contains the page that was just loaded and inserted into the DOM.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

    Development

    No branches or pull requests

      Participants

      @johnbender@toddparker@jblas@v3n3

      Issue actions

        no event before the page is loaded · Issue #2186 · jquery-archive/jquery-mobile