Moved .live(...) into $(function() {}) block - DOM logic should not be left to synchronously execute outside of a DOMContentLoaded closure
This commit is contained in:
parent
1f2592db18
commit
773839308c
1 changed files with 13 additions and 12 deletions
|
|
@ -3,18 +3,6 @@
|
||||||
* the COPYRIGHT file.
|
* the COPYRIGHT file.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
$('#move_friends_link').live( 'click', function(){
|
|
||||||
$.post('/aspects/move_friends',
|
|
||||||
{ 'moves' : $('#aspect_list').data() },
|
|
||||||
function(){ $('#aspect_title').html("Groups edited successfully!");});
|
|
||||||
|
|
||||||
$(".person").css('background-color','none');
|
|
||||||
$('#aspect_list').removeData();
|
|
||||||
$(".person").attr('from_aspect_id', function(){return $(this).parent().attr('id')})
|
|
||||||
|
|
||||||
});
|
|
||||||
|
|
||||||
function decrementRequestsCounter(){
|
function decrementRequestsCounter(){
|
||||||
var old_request_count = $(".new_requests").html().match(/\d+/);
|
var old_request_count = $(".new_requests").html().match(/\d+/);
|
||||||
|
|
||||||
|
|
@ -30,6 +18,19 @@ function decrementRequestsCounter(){
|
||||||
}
|
}
|
||||||
|
|
||||||
$(function() {
|
$(function() {
|
||||||
|
|
||||||
|
|
||||||
|
$('#move_friends_link').live( 'click', function(){
|
||||||
|
$.post('/aspects/move_friends',
|
||||||
|
{ 'moves' : $('#aspect_list').data() },
|
||||||
|
function(){ $('#aspect_title').html("Groups edited successfully!");});
|
||||||
|
|
||||||
|
$(".person").css('background-color','none');
|
||||||
|
$('#aspect_list').removeData();
|
||||||
|
$(".person").attr('from_aspect_id', function(){return $(this).parent().attr('id')})
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
$("ul .person").draggable({
|
$("ul .person").draggable({
|
||||||
revert: true
|
revert: true
|
||||||
});
|
});
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue