Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
jquery ui tables in rails
<!DOCTYPE html>
<html>
<head>
<%= stylesheet_link_tag "application" %>
<%= javascript_include_tag :defaults %>
<%= csrf_meta_tag %>
<%= yield(:head) %>
<%=javascript_tag "$(document).ready(init)" %>
</head>
<body>
<%= yield %>
</body>
</html>
function init() {
$('input:submit').button();
styleTables();
}
function styleTables() {
$(".table th").each(function(){
$(this).addClass("ui-state-default");
});
$(".table td").each(function(){
$(this).addClass("ui-widget-content");
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.