#live is no longer supported, use on instead
This commit is contained in:
parent
cc9c6c780a
commit
d3921f1f2b
7 changed files with 14 additions and 21 deletions
|
|
@ -88,7 +88,7 @@ var app = {
|
|||
Backbone.history.start({pushState: true});
|
||||
|
||||
// there's probably a better way to do this...
|
||||
$("a[rel=backbone]").live("click", function(evt){
|
||||
$(document).on("click", "a[rel=backbone]", function(evt){
|
||||
evt.preventDefault();
|
||||
var link = $(this);
|
||||
|
||||
|
|
|
|||
|
|
@ -3,9 +3,9 @@ app.views.Hovercard = Backbone.View.extend({
|
|||
el: '#hovercard_container',
|
||||
|
||||
initialize: function() {
|
||||
$('.hovercardable')
|
||||
.live('mouseenter', _.bind(this._mouseenterHandler, this))
|
||||
.live('mouseleave', _.bind(this._mouseleaveHandler, this));
|
||||
$(document)
|
||||
.on('mouseenter', '.hovercardable', _.bind(this._mouseenterHandler, this))
|
||||
.on('mouseleave', '.hovercardable', _.bind(this._mouseleaveHandler, this));
|
||||
|
||||
this.show_me = false;
|
||||
|
||||
|
|
|
|||
|
|
@ -17,11 +17,11 @@ function updatePageAspectName( an_id, new_name) {
|
|||
}
|
||||
|
||||
$(document).ready(function() {
|
||||
$('#rename_aspect_link').live('click', function(){
|
||||
$('#aspect_name_title').on('click', '#rename_aspect_link', function(){
|
||||
toggleAspectTitle();
|
||||
});
|
||||
|
||||
$('form.edit_aspect').live('ajax:success', function(evt, data, status, xhr) {
|
||||
$(document).on('ajax:success', 'form.edit_aspect', function(evt, data, status, xhr) {
|
||||
updateAspectName(data['name']);
|
||||
updatePageAspectName( data['id'], data['name'] );
|
||||
toggleAspectTitle();
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
|
||||
var List = {
|
||||
initialize: function() {
|
||||
$(".contact_list_search").live("keyup", function(e) {
|
||||
$(document).on("keyup", ".contact_list_search", function(e) {
|
||||
var search = $(this);
|
||||
var list = $(".contacts", ".searchable");
|
||||
var query = new RegExp(search.val(),'i');
|
||||
|
|
|
|||
|
|
@ -28,13 +28,13 @@ $(document).ready(function(){
|
|||
function(){
|
||||
$(this).find('.participants').slideDown('300');
|
||||
},
|
||||
|
||||
|
||||
function(){
|
||||
$(this).find('.participants').slideUp('300');
|
||||
}
|
||||
);
|
||||
|
||||
$('.conversation-wrapper').live('click', function(){
|
||||
$(document).on('click', '.conversation-wrapper', function(){
|
||||
var conversation_path = $(this).data('conversation-path');
|
||||
|
||||
$.getScript(conversation_path, function() {
|
||||
|
|
@ -101,11 +101,4 @@ $(document).ready(function(){
|
|||
$(document).ajaxError(function(e,xhr,opt){
|
||||
if (xhr.status == 404) { $('a.next_page').remove(); }
|
||||
});
|
||||
|
||||
$('#reply_to_conversation').live('click', function(evt) {
|
||||
evt.preventDefault();
|
||||
$('html, body').animate({scrollTop:$(window).height()}, 'medium', function(){
|
||||
$('#message_text').focus();
|
||||
});
|
||||
});
|
||||
});
|
||||
|
|
|
|||
|
|
@ -217,7 +217,7 @@ $(document).ready(function(){
|
|||
form.remove();
|
||||
});
|
||||
|
||||
$(".new_comment").live("submit", function(evt){
|
||||
$(document).on("submit", ".new_comment", function(evt){
|
||||
evt.preventDefault();
|
||||
var form = $(this);
|
||||
|
||||
|
|
|
|||
|
|
@ -20,8 +20,8 @@ var View = {
|
|||
.keypress(this.search.keyPress);
|
||||
|
||||
/* Dropdowns */
|
||||
$(this.dropdowns.selector)
|
||||
.live('click', this.dropdowns.click);
|
||||
$(document)
|
||||
.on('click', this.dropdowns.selector, this.dropdowns.click);
|
||||
|
||||
/* Avatars */
|
||||
$(this.avatars.selector).error(this.avatars.fallback);
|
||||
|
|
@ -45,7 +45,7 @@ var View = {
|
|||
});
|
||||
};
|
||||
|
||||
$('form[data-remote]').live('ajax:success', function (e) {
|
||||
$(document).on('ajax:success', 'form[data-remote]', function (e) {
|
||||
$(this).clearForm();
|
||||
$(this).focusout();
|
||||
});
|
||||
|
|
@ -73,7 +73,7 @@ var View = {
|
|||
});
|
||||
|
||||
/* facebox 'done' buttons */
|
||||
$("*[rel*=close]").live('click', function(){ $.facebox.close(); });
|
||||
$(document).on('click', "*[rel*=close]", function(){ $.facebox.close(); });
|
||||
|
||||
/* notification routing */
|
||||
$("#notification").delegate('.hard_object_link', 'click', function(evt){
|
||||
|
|
|
|||
Loading…
Reference in a new issue