move js of template to the bottom of the page and migrate toggle js to jquery

yslow states that loading of page is faster when js is at the bottom
This commit is contained in:
Reinier Balt 2009-03-30 23:01:17 +02:00
parent f0e5c3841d
commit 33e96dd42e
2 changed files with 34 additions and 34 deletions

View file

@ -1,7 +1,5 @@
<%= link_to(image_tag( 'blank.png', :width=>'16', :height=>'16', :border=>'0' ), "#", {:class => 'show_notes', :title => 'Show notes'}) %>
<% apply_behavior 'a.show_notes:click', :prevent_default => true do |page, element|
element.next('.todo_notes').toggle
end -%>
<div class="todo_notes" id="<%= dom_id(item, 'notes') %>" style="display:none">
<%= sanitize(markdown( auto_link(item.notes)) ) %>
</div>