function pop(title,content,callback,data) {
title = title || '提示';
var flag = false,popheight = $('body').height();
$('body').append('
');
if (typeof content == 'string') {
if (!/';
}
$('.o_pop_cotent').append(content);
} else if (typeof content == 'function') {
content($('.o_pop_cotent').empty());
} else if (typeof content == 'number') {
setTimeout(function() {
$('#pop_close').click();
},content);
}
$('#popwindow').fadeIn('slow');
$('#pop_close').on('click',function() {
$(this).closest('#popwindow').fadeOut('slow',function() {
$(this).remove();
});
});
var btn = $('#popwindow .o_pop_btn_wrap');
if (typeof callback == 'object') {
$.each(callback,function(k,v) {
btn.append('');
$('.o_pop_'+k).click(function() {
$('#pop_close').click();
});
});
} else if (typeof callback == 'string') {
if ($.trim(callback) == '') {
} else {
btn.empty().append('');
}
$('#o_pop_comfirm').click(function() {
$('#pop_close').click();
});
} else if (typeof callback == 'function') {
if (btn.length > 0) {
return callback(btn.empty());
}
} else if (typeof callback == 'number') {
setTimeout(function() {
$('#pop_close').click();
},parseInt(callback));
}
if (typeof data == 'number') {
setTimeout(function() {
$('#pop_close').click();
},data);
} else if (typeof data == 'string') {
setTimeout(function() {
window.location.href=data.url;
},1500);
} else if (typeof data == 'object' ) {
setTimeout(function() {
window.location.href=data.url;
},data.time);
}
return flag;
}