" +
text +
"
" +
"
");
tiper.find('.okWindow').on('click',function () {
tiper.off('click');
tiper.remove();
bg.remove();
});
$('html').css('height', '100%').append(bg);
$('body').append(tiper)
},
waitingTip:function(text){
let bg=$("
" );
let tipper=$("
");
tipper.animate({opacity:'0'},this.fadingDuration,'swing',function () {
tipper.remove();
bg.remove();
});
$('html').css('height', '100%').append(bg);
$('body').append(tipper);
},
cancelWaitingTip:function(){
let bg=$(".tipperBg");
let tipper=$(".tipper");
tipper.remove();
bg.remove();
},
confirm:function(text,yesFunc,noFunc){
let bg=$("
" );
let tiper=$("
" +
"
" +
text +
"
" +
"
" +
"
");
let $ok = tiper.find('.ok');
let $cancel = tiper.find('.cancel');
$ok.on('click',function () {
$ok.off('click');
$cancel.off('click');
tiper.remove();
bg.remove();
yesFunc();
});
$cancel.on('click',function () {
$ok.off('click');
$cancel.off('click');
tiper.remove();
bg.remove();
if(typeof noFunc!='undefined')
noFunc();
});
$('html').css('height', '100%').append(bg);
$('body').append(tiper);
},
inputVal:function(tipText,resultFunc){
let bg=$("
" );
let tiper=$("
" +
"
" +
tipText +
"
" +
"
" +
"
");
let $ok = tiper.find('.ok');
let $input = tiper.find('.input');
$ok.on('click',function () {
$ok.off('click');
tiper.remove();
bg.remove();
resultFunc($input.val())
});
$('html').css('height', '100%').append(bg);
$('body').append(tiper);
$input.focus()
},
};
module.exports=tempTip;