# Module: BivouacHelpers::TooltipView [ "README", "AUTHORS", "COPYING", "lib/bivouac/helpers/view/goh/base.rb", "lib/bivouac/helpers/view/goh/form.rb", "lib/bivouac/helpers/view/goh/html.rb", "lib/bivouac/helpers/view/goh/tooltip.rb", "lib/bivouac/helpers/view/goh/scriptaculous.rb", "lib/bivouac/helpers/view/goh/javascript.rb", nil].each do JavaScriptGenerator.view_html BivouacHelpers.view_html BivouacHelpers::TooltipView.view_html BivouacHelpers::ScriptAculoUsView.view_html BivouacHelpers::BaseView.view_html BivouacHelpers::JavaScriptView.view_html BivouacHelpers::HtmlView.view_html BivouacHelpers::FormView.view_html end |
bivouac/helpers/view/html
Returns an html div (id name) as a tooltip for element.
div( id => "tooltip_me" ) do "Hello World" end tooltip( "i_m_the_tooltip", "tooltip_me" ) do "Content of the tooltip" end # => <div id="tooltip_me"> Hello World </div> <div id = "i_m_the_tooltip" style = "display:none;"> Content of the tooltip </div> <script> var i_m_the_tooltip = new Tooltip( 'tooltip_me', 'i_m_the_tooltip' ) </script>
See blog.innerewut.de/tooltip for more information about tooltip
[ show source ]
# File lib/bivouac/helpers/view/goh/tooltip.rb, line 24 24: def tooltip( name, element, &block ) 25: div( :id => name, :style => "display:none;" ) do 26: yield( ) 27: end 28: script do 29: "var #{name} = new Tooltip( '#{element}', '#{name}' )" 30: end 31: end