Forums

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

Home Forums CSS Rearranging DOM elements with jQuery

  • This topic is empty.
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #43551
    jshjohnson
    Member

    Hey,

    I am having a bit of trouble making jQuery rearrange two divs when the browser width is mobile.

    At the moment I am using this code:

    But in my console I am getting “Uncaught ReferenceError: mobile is not defined”

    Any ideas?

    http://oandg.co.uk.s156312.gridserver.com/

    #129174
    Paulie_D
    Member

    Is ‘mobile’ a JQ hook?

    I can’t find it referenced in the documentation?

    #129175
    Paulie_D
    Member

    If it is….and I confess to being a JS/JQ noob….don’t you have to wrap the js you are using in a self invoking function?

    [script]
    if (mobile == true) {
    $(‘#bottom’).insertBefore($(‘#top’));
    }
    [/script]

    #129178
    Paulie_D
    Member

    Not as far as I know.

    See caveats above though.

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