Tag Archives: jquery

Get error message “G is null” or “a is null” on jQuery

<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.1/jquery.min.js"></script> <script> $(document).ready(function(){ var obj = null; // ...maybe there are complexed lines... $.each(obj, function(){ }); }); </script> Will get an error message “a is null”. When using jquery.min.js, it might be hard to recognize what kind of error it is. On version 1.3.2 the message says [...]
Posted in Tweak | Also tagged | Leave a comment

Load remote CSS file dynamically with jQuery

These codes are for dynamic loading for remote CSS. It’s easy to load all CSS files from the beginning or just append link element (ref. Switch stylesheets with jQuery). But it rarely needs to load a file dynamically and wait until CSS file has been loaded completely. test.html: <html> <head> <title>css.html</title> <script src="/jquery-1.3.2.js"></script> <script> $(document).ready(function() { // if [...]
Posted in Tweak | Also tagged , | Leave a comment
  • About

    I'm Nobu, a web developer living in Mountain View, CA. Feel free to comment on any posts. I'm also tweeting on twitter.

  • Archives

  • Recent Posts