1 // Change an element text an revert in a smooth pulse. el is an element id like '#copybox h2'
\r
2 function html_pulse( el, newtext ){
\r
3 var oldtext = $(el).html();
\r
4 // Fast pulse to "Copied" and revert
\r
13 "slow", 1, // this fades from 1 to 1: just a 'sleep(1)' actually
\r
15 $(el).fadeTo("normal", 0.01, function(){$(el).html( oldtext ).css('opacity', 1)});
\r
24 // Update feedback message
\r
25 function feedback(msg, type, delay) {
\r
26 delay = delay || 2000;
\r
28 html: '<span>'+msg+'</span>',
\r
30 animationSpeed: "normal",
\r
40 url: "index_ajax.php",
\r
41 data: {mode:'logout'},
\r
42 success: function() {
\r
43 window.parent.location.href = window.parent.location.href;
\r
48 // Begin the spinning animation & disable a button
\r
49 function add_loading(el) {
\r
50 $(el).attr("disabled", "disabled").addClass('disabled').addClass('loading');
\r
53 // End spinning animation
\r
54 function end_loading(el) {
\r
55 $(el).removeClass('loading');
\r
58 // Un-disable an element
\r
59 function end_disable(el) {
\r
60 $(el).removeAttr("disabled").removeClass('disabled');
\r