News for hackers. Stuff that matters.
Re:Superior jQuery plugin template by AndrewHampton on Monday March 19, 2012 @12:39PM (#3724681)
The first line of $.fn.wTooltip is

  if(typeof option === 'object')
Does anyone know where option is declared and where its value is set?
Re:Superior jQuery plugin template by lhorie on Monday March 19, 2012 @12:48PM (#3724744)
It's meant to be the first argument passed to the plugin, e.g.

  $("#bla").wTooltip({foo: "bar"})
Re:Superior jQuery plugin template by rduchnik on Monday March 19, 2012 @12:46PM (#3724737)
My bad, fixed it, was supposed to be here:

    $.fn.wTooltip = function(option, settings)
Re:Superior jQuery plugin template by ftyhgjn on Monday March 19, 2012 @12:58PM (#3724821)
'Untested' and 'superior' are not happy bedfellows!
Re:Superior jQuery plugin template by rduchnik on Monday March 19, 2012 @01:25PM (#3724995)
lol, just a typo ;)
Re:Superior jQuery plugin template by axiak on Monday March 19, 2012 @03:34PM (#3725747)
What happens if I type:

    $("blah").wTooltip(new String("color"));
In my recent jquery plugin I considered doing a typeof check myself but decided against it since it was too brittle. I instead checked to see if the options was === what I expected it to be first.
Re:Superior jQuery plugin template by rduchnik on Monday March 19, 2012 @04:28PM (#3726018)
Well, I think this is getting a little nit picky. I would rather have a smaller footprint for my plugin then putting a bunch of checks like this in. I don't think I've ever passed in a string that way, that would seem to me like a very rare condition.