I’m trying to use enquire.js in a project to control jQuery with media queries I have a jquery slideshow that I want to start when the window is wider than 500px.
I’m using this code in load_Gallery.js
$(document).ready(function() {
enquire.register("screen and (min-width: 500px)", function() {
///slideshow code here
}).listen();
});
I’m calling load_Gallery.js in the head of the page.
<script type="text/javascript" src="js/load_Gallery.js"></script>
I have downloaded enquire.js here –
https://raw.github.com/WickyNilliams/enquire.js/master/dist/enquire.js
I copied this to a txt file and named it enquire.1.4.1.js in my js folder with other js files.
I’m not calling this file like other js files in the head of the document, should I be calling it in the head?
Am I doing something wrong – any advice.
Have you been to http://jquery.com/ and downloaded the file and connected this to your script?