Skip to content

Instantly share code, notes, and snippets.

@trosage
Created December 15, 2011 23:20
Show Gist options
  • Save trosage/1483440 to your computer and use it in GitHub Desktop.
Save trosage/1483440 to your computer and use it in GitHub Desktop.
def tooltip(location, &block)
content = capture(&block)
tooltip_carrot = "<span class=\"icon icon-tooltip-carrot\"></span>".html_safe
content_tag(:span, (content + tooltip_carrot), :class => "tooltip tooltip-#{location}")
end
// I want a param that I can set that will add this line of code (below) before the tooltip_carrot snippet is added. I want the param to be optional so if I dont set it the code just wont be added.
<a class=\"close-tooltip\"><span class=\"icon icon-close-tooltip\"></span></a>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment