problem about yepnope-Collection of common programming errors
lsmagalhaes
javascript angularjs yepnope
I’m writing an app with mostly two javascripts, resources_loader.js and app.js, where the first loads some json files used by app.js.The problem is: app.js (which has angular.js stuff) should run only after resources_loader.js. I tried to run angular code inside the success callback (resources_loader contains a deferred), but this not seems to work well. Here’s my index.html:<!doctype html> <html ng-app=”myapp”> <body><script src=”angular.js”></script><script src
Rayraegah
javascript jquery google-chrome yepnope
I’m using yepnope.js to conditionally load css and js files into my page.I’ve merged my JS files into a single file. The structure is as follows:/* file */// – copy pasted Jquery 1.7rc2.min here -(function () { console.log(“enabled hold”); jQuery.holdReady(true); })();// – copy pasted yepnope.min here -yepnope([ {test: condition,load: [css files] },{load:[js files],callback: function () {…},complete: function () { jQuery.holdReady(false); console.log(“hold released”);} }]);/* end of file */and
Frank Parent
javascript css asynchronous modernizr yepnope
I’m trying to load a dynamically generated Google Font stylesheet using Modernizr (YepNope) but always get this error:Uncaught SyntaxError: Unexpected token ILLEGAL (css:1)My stylesheet looks like this:http://fonts.googleapis.com/css?family=Holtwood+One+SCand I’m calling it viaModernizr.load({load: [‘css!http://fonts.googleapis.com/cssfamily=Holtwood+One+SC|Terminal+Dosis:700’],callback: function (url, result, key) {console.log(‘loaded…!’); } });The website says this but for s
Milksamsa
jquery fancybox yepnope
I’m trying to conditionally load Fancybox js and css code and execute it on an element only if the element is present and I’m in a particular page. So far I’ve been trying the following code:yepnope({ test : jQuery(‘body’).hasClass(‘edizioni’), yep : [‘/assets/css/jquery.fancybox.css’,’/assets/js/libs/jquery.fancybox.pack.js’,’/assets/js/libs/jquery.mousewheel-3.0.6.pack.js’,jQuery(“#gallery a”).fancybox()] });I get a Uncaught TypeError: Object [object Object] has no method ‘fancybox’I guess jq
am_
jquery ajax yepnope adobe-edge
So I´m trying to retrieving an Edge animation through jQuerys $.getScript() which is the same as calling $.ajax with dataType: script.Now if I include the script with a script tag it works fine, but when I try to load and execute the script through $.getScript() nothing happens. (I dont get any errors, and the script and sub-scripts are loaded fine – but nothing happens.)Have anyone tried doing this before? I suspect I have problems loading it through AJAX because Adobe uses yepnope in page_a_ed
JonnyDevv
modernizr yepnope
I’m using a CDN to Load Bootstrap.css. My question is how can i check if CDN bootstrap was loaded/found. And if it wasn’t, then load local Boostrap.Here’s Jquery fallback..<script type=”text/javascript”>Modernizr.load([{load: ‘//cdnjs.cloudflare.com/ajax/libs/jquery/1.10.1/jquery.min.js’,complete: function () {if ( !window.jQuery ) {Modernizr.load([{load: config.js + ‘vendor/jquery-1.10.1.min.js’,complete: function () {console.log(“Local jquery-1.10.1.min.js loaded !”);}}]);} else {console
Ash Clarke
javascript jquery document.ready yepnope asynchronous-loader
I have been implementing the yepnope script loader as part of the modernizr.js library. I have successfully got jQuery to load and jQuery dependent scripts afterwards. I am new to asynchronous loading of resources, so it’s a bit new to me. I have been searching around, but haven’t had much luck with the following.My question is what are your opinions on how to effectively replace the functionality of $(document).ready() when working with the yepnope.js framework. My theory was to create a approp
daryl
javascript modernizr yepnope
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 chrome on OS X.
StackOverFlow
jquery iframe internet-explorer-8 jquery-ui-dialog yepnope
I am using jquery modal dialogue, within dialogue we embedded iframe. iframe contain button “Show search result”at 1st attempt of “Show search result” button click, nothing happen. My result is not rendering in table (probably server request is not firing).It appears only when I switched to other tab of browesr, 2nd time onwards table rendering properly. var __run = function(getData) {yepnope({test : $.fn.flexigrid,nope : [ ‘www/css/flexigrid.css’, ‘/www/javascripts/flexigrid.js’],complete : get
KajMagnus
javascript angularjs modernizr yepnope
Modernizr.load({ both: [a, b] }) seems to executes b before a but that’s not how Modernizr is supposed to work? “yepnope.js [used by Modernizr] always executes things in the order they are listed”Modernizr versions 2.5.3 and 2.6.2.I’m loading angular.js and angular-sanitize.js like so:Modernizr.load({both: [cdnDir + ‘angular.js’,cdnDir + ‘angular-sanitize.js’,d.i.assetsUrlPathStart + ‘debiki-dashbar.js’],complete: bootstrapAngular })However, infrequently, angular-sanitize.js dies because angular
davydepauw
javascript modernizr yepnope
I’m trying to load in a specific CSS stylesheet depending whether certain CSS3 features aren’t supported in that browser.The JS code I use is this:// Modernizr feature tests Modernizr.load({test: Modernizr.borderradius,nope: ‘/assets/css/border-radius.css’ });In IE8 this gives, according to the developer tools:<link href=”undefined” rel=”stylesheet” type=”text/css” />Any ideas?
beingalex
javascript modernizr yepnope
How do I check for FormData object using Modernizr and YepNope?<script> yepnope({ test : what.to.check, yep : ‘normal.js’, nope : ‘flashupload.js’ }); </script>
U.J.
yepnope
I am using a “2-step view”, where I have a layout template (common for all pages) with yepnope’s load (in the html head) of jQuery and some plugins. Something like:yepnope([‘/path/to/jquery.js’, ‘/path/to/jquery.plugin-common.js’]);Sometimes I need another plugin, so within the inner template I do additional (in the html body):yepnope(‘/path/to/jquery.plugin-additional.js’);Now that I need to do the actual js magic, can I safely do just:yepnope({complete: function(){…} });So, the questions are
KrisWebDev
javascript greasemonkey modernizr userscripts yepnope
When yepnope (which comes by default bundled in Modernizr) is used on a GreaseMonkey userscript that @runs-at document-start, the whole userscript fails with the error “n is undefined”, which means maxified that “firstScript is undefined”.Indeed it refers to the line: insBeforeObj = isGeckoLTE18 ? docElement : firstScript.parentNode,
Originally posted 2013-11-28 09:37:37.