Skip to content

Commit

Permalink
added explanation of $.fn.elementOptions
Browse files Browse the repository at this point in the history
  • Loading branch information
jaz303 committed Jan 1, 2010
1 parent b250fdb commit aabc591
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/javascripts/jquery.tipsy.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,10 @@

};

// Overwrite this method to provide options on a per-element basis.
// For example, you could store the gravity in a 'tipsy-gravity' attribute:
// return $.extend({}, options, {gravity: $(ele).attr('tipsy-gravity') || 'n' });
// (remember - do not modify 'options' in place!)
$.fn.tipsy.elementOptions = function(ele, options) {
return $.metadata ? $.extend({}, options, $(ele).metadata()) : options;
};
Expand Down

0 comments on commit aabc591

Please sign in to comment.