Skip to content

Instantly share code, notes, and snippets.

@bradgessler
Created December 3, 2009 01:00
Show Gist options
  • Save bradgessler/247798 to your computer and use it in GitHub Desktop.
Save bradgessler/247798 to your computer and use it in GitHub Desktop.
def button_tag_menu(value, options={}, &block)
options[:onclick] = "$(this).up('.menuButton').down('.menu').show();"
%{
<div class="menuButton">
#{button_tag(value, options)}
<div class="menu" style="display: none;">
#{capture(&block)}
</div>
</div>
}
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment