Created
February 16, 2012 17:32
-
-
Save andrewhl/1846625 to your computer and use it in GitHub Desktop.
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
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <title>Site</title> | |
| <%= stylesheet_link_tag "application" %> | |
| <%= javascript_include_tag "application" %> | |
| <%= javascript_include_tag "success" %> | |
| <%= csrf_meta_tags %> | |
| </head> | |
| <body class="<%= yield(:class) %>"> | |
| <div id="container"> | |
| <% flash.each do |key, value| %> | |
| <%= content_tag(:div, value, :class => "flash #{key}") %> | |
| <% end %> | |
| <%= yield %> | |
| </div> | |
| <!-- <%= debug(params) if Rails.env.development? %> --> | |
| </body> | |
| </html> |
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
| $('#my-link').click(function(event){ | |
| alert('Hooray!'); | |
| event.preventDefault(); // Prevent link from following its href | |
| }); |
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
| <%= link_to 'Link with unobtrusive JavaScript', '#', :id => 'my-link' %> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment