javascripts/right-tooltips-src.js in right-rails-0.3.2 vs javascripts/right-tooltips-src.js in right-rails-0.4.0

- old
+ new

@@ -28,13 +28,13 @@ }, current: null, // currently active tooltip reference // scans the page for auto-discoverable tooltiped elements - rescan: function() { + rescan: function(scope) { var key = Tooltip.Options.relName; - $$(Tooltip.Options.checkTags+'[rel='+key+']').each(function(element) { + ($(scope) || document).select(Tooltip.Options.checkTags+'[rel='+key+']').each(function(element) { var text = element.get('title') || element.get('alt'); if (text) { var data = element.get('data-'+key+'-options'); new Tooltip(element, eval('('+data+')')); } @@ -116,10 +116,10 @@ * The post load tooltips initialization script * * Copyright (C) 2009 Nikolay V. Nemshilov aka St. */ document.on({ - ready: Tooltip.rescan, + ready: function() { Tooltip.rescan(); }, mousemove: function(event) { if (Tooltip.current) { Tooltip.current.moveTo(event); } \ No newline at end of file