Menu icon Foundation

My Posts

  • 4
    Replies
  • Foundation.MediaQuery not working

    By AE

    media queriesjquery

    I'm trying to create some jQuery that targets only small screens and when I try using Foundation.MediaQuery.atLeast or Foundation.MediaQuery.get, I just get null values. For example, console.log(Foundation.MediaQuery.get('medium')); returns null. My br... (continued)

    Last Reply by AE almost 3 years ago


My Comments

AE commented on AE's post almost 3 years

FoundationPress must initilaize it already somewhere. Any ideas what else could be causing the media query utilities to not work?

AE commented on AE's post almost 3 years

What does that mean? I'm using FoundationPress so I'm assuming that's already taken care of, but the docs say to put this above the closing body tag, so I did that.
<script>
$(document).foundation();
</script>
Now I get these error messages in my console, and Foundation.MediaQuery.get('medium') still returns null.
Tried to initialize accordion-menu on an element that already has a Foundation plugin.foundation.js:459:13
Tried to initialize dropdown-menu on an element that already has a Foundation plugin.foundation.js:459:13

Posts Followed

  • 4
    Replies
  • Foundation.MediaQuery not working

    By AE

    media queriesjquery

    I'm trying to create some jQuery that targets only small screens and when I try using Foundation.MediaQuery.atLeast or Foundation.MediaQuery.get, I just get null values. For example, console.log(Foundation.MediaQuery.get('medium')); returns null. My br... (continued)

    Last Reply by AE almost 3 years ago


Following

    No Content

Followers

My Posts


My Comments

You commented on AE's post almost 3 years

FoundationPress must initilaize it already somewhere. Any ideas what else could be causing the media query utilities to not work?

You commented on AE's post almost 3 years

What does that mean? I'm using FoundationPress so I'm assuming that's already taken care of, but the docs say to put this above the closing body tag, so I did that.
<script>
$(document).foundation();
</script>
Now I get these error messages in my console, and Foundation.MediaQuery.get('medium') still returns null.
Tried to initialize accordion-menu on an element that already has a Foundation plugin.foundation.js:459:13
Tried to initialize dropdown-menu on an element that already has a Foundation plugin.foundation.js:459:13

Posts Followed


Following

  • No Content

Followers

  • No Content