I am trying to (locally) use Yepnope with Modernizr to load CSS & JS Files. So I can manage the files better, and code easily.  This is the currently layout:  Modernizr.load([     {         test: Modernizr.mq('all and (max-width: 1070px)'...
How come this alerts both, yes and false?  Modernizr.load([     {         test: Modernizr.cssgradients,         yep: alert('Supports it!'),         nope: alert('Oh, damn! This browser sucks!')     } ]);   I'm using the latest chro...
Using javascript to asynchronously download another javascript file.  I understand that this can be done by inserting a new script tag onto the page with the src attribute set to the file url.  I also need to run some code when the script is finished...
I'm running into a race condition when using Modernizr to load a CSS file. On my local and staging environments, it loads the CSS file below another stylesheet in the head. This is what I want it to do, so the rules defined in the asynchronously...
I have an app that has a bunch of resources.  Having read about javascript loaders I decided to see what kind of boost I'd get from loading resources asynchronously.  To my surprise I found that using a loader was visibly slower (no stopwatch nee...
My application previously heavily using Modernizr to load script and shim, i have been stuck for a while with a problem on loading Angular JS. Loading using Modernizr right after JQuery will produce an error; No module : (module name);  But when i mo...
The yepnope.js provides its useful API: yepnope. It accepts a single object or an array as its parameter.  But are   yepnope({   load: 'a.js',   complete: function() {     console.log("loaded a.js");   }, });  yepnope({   load: 'b...
Right, I've just started using yepnope.js for resource loading... I like the idea but it's not behaving itself at the moment.  I use the following code to load a JavaScript resource:  <script>     yepnope('/resource.php?js&file=...
Here's the code, there's a prefix that defines local! but that's it. No matter what, the second argument in the callback is always false whether it loads correctly or not.  Also window.jQuery always returns undefined, so I have no idea wh...
I want to include fancybox only when there is no touch device involved. This is my code so far:  <script>     yepnope([{         test : Modernizr.touch,         nope  : './js/lib/fancybox/jquery.fancybox.pack.js',         callback : {...

Tags

Recent Questions

Top Questions

Home Tags Terms of Service Privacy Policy DMCA Contact Us

©2020 All rights reserved.