changeset 78:6ae3333a0251

Moved out link click listener from $(document).ready.
author Edho Arief <edho@myconan.net>
date Sun, 07 Oct 2012 16:05:30 +0700
parents 2fb80ca710e0
children 50b8738d6428
files app/assets/javascripts/pastes.js
diffstat 1 files changed, 5 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/app/assets/javascripts/pastes.js	Thu Oct 04 10:49:23 2012 -0700
+++ b/app/assets/javascripts/pastes.js	Sun Oct 07 16:05:30 2012 +0700
@@ -1,11 +1,11 @@
 // Place all the behaviors and hooks related to the matching controller here.
 // All this logic will automatically be available in application.js.
 
+$(document).on('click', '#reset_paste', function() {
+  $('#paste_paste').val('');
+  $('#paste_paste').focus();
+  return false;
+});
 $(document).ready(function() {
-  $('#reset_paste').click(function() {
-    $('#paste_paste').val('');
-    $('#paste_paste').focus();
-    return false;
-  });
   $('#paste_paste').focus();
 })