This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def with_tooltip(tool_tip_text, options={}, &block) | |
content = capture(&block) | |
opts = tag_options(options[:html]); | |
uid = "tooltipjs_#{get_uid}" | |
js = %{ | |
var parent = $('#{uid}').up(); | |
var trigger = parent.getElementsByClassName('TooltipTrigger')[0] || parent; | |
var tooltip = parent.getElementsByClassName('Tooltip')[0]; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<% with_tooltip "Click to see me!", :event => :click do %> | |
some html or plain text here ... | |
<% end -%> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<% with_tooltip "I am a tooltip!" do %> | |
some html or plain text here ... | |
<% end -%> |
NewerOlder