02.06.2013 Views

jQuery 1.4 Animation Techniques - Index of

jQuery 1.4 Animation Techniques - Index of

jQuery 1.4 Animation Techniques - Index of

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Fading <strong>Animation</strong>s<br />

text: "Cancel",<br />

title: "Cancel"<br />

}).appendTo(confirmDiv),<br />

deleteRow = function(e) {<br />

var selector = (window.ActiveXObject) ? $(this).closest("tr").<br />

children() : $(this).closest("tr");<br />

selector.fadeTo(400, 0.5, function() {<br />

$(this).addClass("pre-delete");<br />

if(!$(".confirm").length) {<br />

confirmDiv.clone().insertAfter(messages);<br />

}<br />

messages.find("a").unbind();<br />

});<br />

};<br />

messages.find("a").click(deleteRow);<br />

$("#delete, #cancel").live("click", function(e) {<br />

if (this.id === "delete") {<br />

messages.find(".pre-delete").fadeTo(400, 0, function() {<br />

$(this).remove();<br />

if (window.ActiveXObject) {<br />

messages.find("tr").each(function() {<br />

var row = $(this);<br />

if(!row.children().length) {<br />

row.remove();<br />

}<br />

});<br />

}<br />

});<br />

} else {<br />

e.preventDefault();<br />

messages.find(".pre-delete").removeClass("predelete").fadeTo(400,<br />

1, function() {<br />

[ 44 ]

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!