comparison app/assets/javascripts/pastes.js @ 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 5635c91f4bfd
children 50b8738d6428
comparison
equal deleted inserted replaced
77:2fb80ca710e0 78:6ae3333a0251
1 // Place all the behaviors and hooks related to the matching controller here. 1 // Place all the behaviors and hooks related to the matching controller here.
2 // All this logic will automatically be available in application.js. 2 // All this logic will automatically be available in application.js.
3 3
4 $(document).on('click', '#reset_paste', function() {
5 $('#paste_paste').val('');
6 $('#paste_paste').focus();
7 return false;
8 });
4 $(document).ready(function() { 9 $(document).ready(function() {
5 $('#reset_paste').click(function() {
6 $('#paste_paste').val('');
7 $('#paste_paste').focus();
8 return false;
9 });
10 $('#paste_paste').focus(); 10 $('#paste_paste').focus();
11 }) 11 })