Permalink
Browse files

Added a super class Tooltips as a shorthand for CSS selectors

  • Loading branch information...
1 parent c32282a commit 2419d2cbfe53f345e6f62f366dc9e399b5f9554a @okonet committed Jul 18, 2008
Showing with 12 additions and 1 deletion.
  1. +12 −1 tooltips.js
View
@@ -1,4 +1,15 @@
-// Tooltip Object
+// Tooltips Class
+// A superclass to work with simple CSS selectors
+var Tooltips = Class.create();
+Tooltips.prototype = {
+ initialize: function(selector, options) {
+ var tooltips = $$(selector);
+ tooltips.each( function(tooltip) {
+ new Tooltip(tooltip, options);
+ });
+ }
+};
+// Tooltip Class
var Tooltip = Class.create();
Tooltip.prototype = {
initialize: function(el, options) {

0 comments on commit 2419d2c

Please sign in to comment.