Created
December 15, 2011 23:56
-
-
Save trosage/1483569 to your computer and use it in GitHub Desktop.
This file contains 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 tooltip(location, close=false, &block) | |
content = capture(&block) | |
if close == true | |
"<a class=\"close-tooltip\"><span class=\"icon icon-close-tooltip\"></span></a>".html_safe | |
end | |
tooltip_carrot = "<a class=\"close-tooltip\"><span class=\"icon icon-close-tooltip\"></span></a><span class=\"icon icon-tooltip-carrot\"></span>".html_safe | |
content_tag(:span, (content + tooltip_carrot), :class => "tooltip tooltip-#{location}") | |
end | |
<% tooltip 'left' do %> | |
<strong>Customize Treehouse</strong> | |
<span class="note">Build your own path by limiting the list of topics Treehouse offers to the ones that interest you most.</span> | |
<% end %> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment