# HG changeset patch # User Edho Arief # Date 1349600730 -25200 # Node ID 6ae3333a0251fff62275920e3f074e605f093c09 # Parent 2fb80ca710e08eff6250476fc4b14893b9fd7352 Moved out link click listener from $(document).ready. diff -r 2fb80ca710e0 -r 6ae3333a0251 app/assets/javascripts/pastes.js --- 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(); })