jQWidgets Forums

jQuery UI Widgets Forums General Discussions Placement of Javascript

Tagged: 

This topic contains 3 replies, has 3 voices, and was last updated by  Peter Stoev 12 years, 10 months ago.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
  • Placement of Javascript #4554

    jmarais
    Participant

    When you want to invoke any of the widgets, you have to place the code similar to the examples. My question is whether it is a necessity that they have to be in the head section of the page, or will placing them in the body part work?

    Placement of Javascript #4563

    Peter Stoev
    Keymaster

    It will work either way. It is important to initialize the widgets in the jQuery’s document.ready function.

    Best Wishes,
    Peter Stoev

    jQWidgets Team
    http://www.jqwidgets.com

    Placement of Javascript #5447

    brian
    Member

    Hi Peter,

    is it possible to initialise the widget in document.ready but then load data into it via document.onload?

    I’m messing around in wakanda but find teh widgets a bit flakey, seeing if I can use these ones.

    the wakanda data sources and ssjs calls are not available until document.onload

    if possible, a wee example?

    thanks

    Brian

    Placement of Javascript #5448

    Peter Stoev
    Keymaster

    Hi Brian,

    The ready event occurs after the HTML document has been loaded, while the onload event occurs later, when all content (e.g. images) also has been loaded. It should be possible to load the data into the onload.

    Best Wishes,
    Peter Stoev

    jQWidgets Team
    http://www.jqwidgets.com

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.