initial feedback.js
This commit is contained in:
parent
5636fcde22
commit
34fd9baf3a
36
feedback.js
Normal file
36
feedback.js
Normal file
@ -0,0 +1,36 @@
|
||||
function ajaxFeedback(e,url,css) {
|
||||
$.ajax({
|
||||
url: url,
|
||||
success: function() {
|
||||
successMarker(e,css);
|
||||
},
|
||||
});
|
||||
return false;
|
||||
}
|
||||
|
||||
function successMarker(e,css) {
|
||||
var cursorX = e.offsetLeft || 0;
|
||||
var cursorY = e.offsetTop || 0;;
|
||||
|
||||
o = $('<div style="position: absolute; top:'+cursorY+'px; left: '+ cursorX +'px; width: 20px; height: 20px; background-color: #0f0; '+css+'">OK</div>');
|
||||
$( "body" ).append( o );
|
||||
$(o).fadeOut(5000);
|
||||
}
|
||||
|
||||
function warnMarker(e,css) {
|
||||
var cursorX = e.offsetLeft || 0;
|
||||
var cursorY = e.offsetTop || 0;;
|
||||
|
||||
o = $('<div style="position: absolute; top:'+cursorY+'px; left: '+ cursorX +'px; width: 20px; height: 20px; background-color: #ff0; '+css+'">!</div>');
|
||||
$( "body" ).append( o );
|
||||
$(o).fadeOut(5000);
|
||||
}
|
||||
|
||||
function errorMarker(e,css) {
|
||||
var cursorX = e.offsetLeft || 0;
|
||||
var cursorY = e.offsetTop || 0;;
|
||||
|
||||
o = $('<div style="position: absolute; top:'+cursorY+'px; left: '+ cursorX +'px; width: 20px; height: 20px; background-color: #f00; '+css+'">Err</div>');
|
||||
$( "body" ).append( o );
|
||||
$(o).fadeOut(5000);
|
||||
}
|
||||
Loading…
Reference in New Issue
Block a user