KUMobile

API Docs for: 0.0.2

KUMobile.Announcements

Module: KUMobile

Contains all announcements related functions for loading and controlling the announcements page.

loadNextPage

()

Loads and displays the next set of items.

Example:

KUMobile.Announcements.loadNextPage();

listQueue

Array private

Contains the current list of article DOM

  • tag items that still need to be added to the DOM (much faster to add all at once after load is done downloading). This helps prevent the application from seeming to hang or become unresponsive.

  • LOAD_THRESHOLD_PX

    int

    Designates the minimum number of pixels that the user can scroll (calculated from the bottom) before another load event is triggered.

    Default: 660

    loading

    boolean

    Is the announcements page loading?

    Default: false

    page

    int

    Current page number as referenced from the announcements website.

    Default: 0

    PAGES_TO_LOAD

    int

    Number of pages to load from the website after a trigger event occurs.

    Default: 2

    queue

    int private

    How many pages that need to be downloaded still. This is used to asynchronously download pages.

    Default: 0

    pageCreate

    Triggered when the announcements page is first created based on jQuery Mobile pagecreate event. This is called after the page itself is created but before any jQuery Mobile styling is applied.

    pageInit

    Triggered when the announcements page is first initialized based on jQuery Mobile pageinit event.

    scroll

    Triggered when regular scroll event happens in announcements scroller window. It is used to check if the user is near the bottom of the page, so more content can be loaded (simulate infinite scrolling).