Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums JavaScript document ready

  • This topic is empty.
Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #46019
    nuodas159
    Participant

    Hello,
    why doesn’t work?

    http://codepen.io/anon/pen/jFpgr

    #141256
    waylaid
    Member

    Close your code with this }); rather than } and select jQuery from the JS option menu.

    For this bit of JS code you really don’t need jQuery or the document ready declaration.

    #141206
    nuodas159
    Participant

    Then how to make ? That when everything okey I mean ready then giving the height to the block?

    #141264
    waylaid
    Member

    Sorry, just meant your code snippet would work within CodePen without jQuery or document ready. If you’re going to be using other jQuery code on your page then uses that.

    For pure JavaScript there are various methods of checking everything is loaded which I’m not too familiar with as I always end up using jQuery anyway.

    #141269
    nuodas159
    Participant

    Am thanks.

Viewing 5 posts - 1 through 5 (of 5 total)
  • The forum ‘JavaScript’ is closed to new topics and replies.