Permalink
Browse files

Update jQuery

  • Loading branch information...
1 parent 32791d9 commit 50607f4af074b009574c965bec867e0b5fe6bc13 @namelessjon committed Mar 25, 2011
Showing with 183 additions and 3,569 deletions.
  1. +16 −18 public/ditty.js
  2. +166 −0 public/jquery-1.4.3.min.js
  3. +0 −3,549 public/jquery.js
  4. +1 −2 views/index.haml
View
@@ -1,14 +1,14 @@
$(document).ready(function() {
// let tiddlers be closed
- $("div.ditty a[rel='close']").livequery('click',
+ $("div.ditty a[rel='close']").live('click',
function() {
$(this).parents('.ditty').slideUp('fast', function() { $(this).remove(); } );
return false;
}
);
// make get links work
- $("a.existing").livequery('click',
+ $("a.existing").live('click',
function() {
var tag = this;
var ditty_name = $(this).attr('title');
@@ -23,7 +23,7 @@ $(document).ready(function() {
);
// make the editing form cancellable
- $("div.ditty_edit ul.edit_links a[rel='cancel']").livequery('click',
+ $("div.ditty_edit ul.edit_links a[rel='cancel']").live('click',
function() {
$(this).parents('.ditty_edit').prev().slideDown('fast');
$(this).parents('.ditty_edit').remove();
@@ -32,7 +32,7 @@ $(document).ready(function() {
);
// make the new link work.
- $("a[href='/new']").livequery('click',
+ $("a[href='/new']").live('click',
function() {
var tag = this
$.get(this, function(data, status) {
@@ -43,7 +43,7 @@ $(document).ready(function() {
);
// make a new link work.
- $("a.new_ditty").livequery('click',
+ $("a.new_ditty").live('click',
function() {
var tag = this
$.get(this, function(data, status) {
@@ -54,19 +54,17 @@ $(document).ready(function() {
);
// make edit links work
- $("div.ditty a[rel='edit']").livequery('click',
- function() {
- var tag = this;
- $.get(this, function(data, status) {
- $(tag).parents('.ditty').after(data);
- $(tag).parents('.ditty').hide();
- });
- return false;
- }
- );
+ $('#ditties').delegate("div.ditty a[rel='edit']", 'click', function(event) {
+ var tag = $(this);
+ $.get(tag, function(data, status) {
+ $(tag).parents('.ditty').after(data);
+ $(tag).parents('.ditty').hide();
+ });
+ return false;
+ });
// make delete links work
- $("div.ditty_edit a[rel='destroy']").livequery('click',
+ $("div.ditty_edit a[rel='destroy']").live('click',
function() {
var tag = this;
$.ajax({
@@ -88,7 +86,7 @@ $(document).ready(function() {
);
// make done links work
- $("div.ditty_edit a[rel='update']").livequery('click',
+ $("div.ditty_edit a[rel='update']").live('click',
function() {
var tag = this;
var form_data = {};
@@ -117,7 +115,7 @@ $(document).ready(function() {
);
// make done links work on create forms
- $("div.ditty_edit a[rel='create']").livequery('click',
+ $("div.ditty_edit a[rel='create']").live('click',
function() {
var tag = this;
var form_data = {};
Oops, something went wrong.

0 comments on commit 50607f4

Please sign in to comment.