8
8
//= require jquery.flexslider-min
9
9
//= require underscore
10
10
11
- //= require jquery- dropdown
11
+ //= require jquery. dropdown
12
12
13
13
$ ( function ( ) {
14
- $ ( 'a.remove-parent' ) . live ( 'click' , function ( e ) {
14
+ $ ( 'a.remove-parent' ) . on ( 'click' , this . selector , function ( e ) {
15
15
$ ( this ) . parents ( '.' + $ ( this ) . attr ( 'data-parent' ) ) . slideUp ( ) ;
16
16
e . preventDefault ( ) ;
17
17
} ) ;
18
18
registerButtons ( ) ;
19
- } )
19
+ } ) ;
20
20
21
21
$ ( function ( ) {
22
22
$ ( '[placeholder]' ) . focus ( function ( ) {
@@ -33,15 +33,15 @@ $(function () {
33
33
}
34
34
} ) . blur ( ) ;
35
35
36
- $ ( '.save a' ) . live ( 'click' , function ( e ) {
36
+ $ ( '.save a' ) . on ( 'click' , this . selector , function ( e ) {
37
37
var form = $ ( this ) . parents ( 'form' ) ;
38
38
$ . post ( form . attr ( 'action' ) , form . serialize ( ) ) . success ( function ( response ) {
39
39
40
40
} ) ;
41
41
e . preventDefault ( ) ;
42
42
} )
43
43
44
- $ ( 'a.submitEndorsement' ) . live ( 'click' , function ( e ) {
44
+ $ ( 'a.submitEndorsement' ) . on ( 'click' , this . selector , function ( e ) {
45
45
var form = $ ( this ) . parents ( 'form' ) ;
46
46
$ . post ( form . attr ( 'action' ) , form . serialize ( ) ) . success ( function ( response ) {
47
47
$ . fancybox . close ( ) ;
@@ -67,18 +67,18 @@ $(function () {
67
67
} , 1500 ) ;
68
68
} ) ;
69
69
e . preventDefault ( ) ;
70
- } )
70
+ } ) ;
71
71
72
72
$ ( '#nocount input, #withcount input' ) . live ( 'change' , function ( ) {
73
73
$ ( '.endorseButtons .markdown, .endorseButtons .html, .endorseButtons .textile' ) . toggleClass ( 'hide' ) ;
74
74
} ) ;
75
75
76
- $ ( 'a.seeMore' ) . live ( 'click' , function ( e ) {
76
+ $ ( 'a.seeMore' ) . on ( 'click' , this . selector , function ( e ) {
77
77
$ ( this ) . siblings ( '.seeMore' ) . slideDown ( ) ;
78
78
e . preventDefault ( ) ;
79
79
} ) ;
80
80
81
- $ ( '#achievementcode a ' ) . live ( 'click' , function ( ) {
81
+ $ ( '#achievementcode' ) . on ( 'click' , this . selector , function ( ) {
82
82
$ ( this ) . hide ( ) . parents ( 'em' ) . hide ( ) ;
83
83
$ ( '.claimcode' ) . fadeIn ( ) ;
84
84
e . preventDefault ( ) ;
@@ -115,11 +115,11 @@ $(function () {
115
115
}
116
116
} ) ;
117
117
118
- $ ( "a.closefancybox" ) . live ( " click" , function ( e ) {
118
+ $ ( "a.closefancybox" ) . on ( ' click' , this . selector , function ( e ) {
119
119
$ . fancybox . close ( ) ;
120
120
} ) ;
121
121
122
- $ ( '.event_links a.more' ) . live ( 'click' , function ( e ) {
122
+ $ ( '.event_links a.more' ) . on ( 'click' , this . selector , function ( e ) {
123
123
$ ( this ) . siblings ( '.more.hide' ) . slideToggle ( ) ;
124
124
e . preventDefault ( ) ;
125
125
} ) ;
@@ -192,7 +192,7 @@ function handle_redirect(response) {
192
192
}
193
193
194
194
function registerButtons ( ) {
195
- $ ( "a.follow-team:not(.noauth)" ) . live ( " click" , function ( e ) {
195
+ $ ( "a.follow-team:not(.noauth)" ) . on ( ' click' , this . selector , function ( e ) {
196
196
$ ( this ) . toggleClass ( "following" ) ;
197
197
return e . preventDefault ( ) ;
198
198
} ) ;
0 commit comments