jQuery Error: ‘g is undefined’

Discovered the cause of this annoying (but seemingly impotent) error in a response by Karl Swedberg on Nabble.

The error was caused by my passing only one function to jQuery.hover(), eg:

 jQuery(".blog-entry-date").hover(function(){
                jQuery(this).animate({color: genHex()},100);
        });

Hover takes two functions. Instead ‘mouseenter’ should be used:

 jQuery(".blog-entry-date").bind('mouseenter',function(){
                jQuery(this).animate({color: genHex()},100);
        });

The error didn’t seem to have any effect on the execution of the code (at least in Firefox), but errors are errors, and the the cause should be hunted down. Always.

Like this post? Move it on along with:

email Email | delicious delicious | digg Digg | Tweet this post Tweet | reddit Reddit | newsvine Newsvine | furl Furl | google Google | StumbleUpon Stumble | Hao Hao HaoHao


Trackback:

Comments: 0 | Comments Feed


Scroll to top

Related posts:

  1. Using PNG Transparency + the jQuery Colour Change Plugin A tutorial describing how to achieve the "colour change on roll-over" effect used in this site's RSS and Twitter links in the sidebar....
  2. Scroll to Anchors With jQuery This post will introduce and explain the "scroll to anchor" method I have used throughout this site. For a demo, click "scroll to Comments", which you'll find above....
  3. Return an NSMutableString as NSString Avoiding “Uncaught Error 11″ with Cocoa Scroll to comments Another stumbling block on the road to Slider completion was this: NSUncaughtSystemExceptionException — Uncaught system exception: signal 11 This vague and unhelpful error message (in this case) was caused by my trying to return an NSMutableString in place of an NSString: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16...
  4. Shadowbox rel=’shadowbox’ Doesn’t Work? Here’s a Workaround Yesterday I was trying to implement a Shadowbox contact form in the Bay of Islands SPCA site, but I just couldn't get it to work....

No commentsTrackback

Comments are closed.