document.write("");
document.write(" ");
document.write("
在线客服
");
document.write("-
QQ客服 ");
document.write("-
QQ客服 ");
document.write("
咨询热线
021-67768089
");
document.write("
");
(function($) {
$.fn.qqFloat = function(options) {
var opts = $.extend({}, $.fn.qqFloat.defaults, options);
var hiddenObj = $(opts.hiddenObj, $(this));
var showObj = $(opts.showObj, $(this));
var tips = $(this)[0];
var theTop = parseInt(opts.defaultY);
var old = theTop;
$(this).css("top", parseInt(opts.defaultY));
$(this).css(opts.leftOrRight, parseInt(opts.defaultX));
showObj.css(opts.leftOrRight, parseInt(opts.defaultX));
return this.each(function() {
hiddenObj.mouseenter(function() {
$(this).show();
showObj.show();
});
showObj.mouseleave(function() {
$(this).show();
hiddenObj.show();
});
function moveTips() {
var tt = 150;
if (window.innerHeight) {
pos = window.pageYOffset;
}
else if (document.documentElement && document.documentElement.scrollTop) {
pos = document.documentElement.scrollTop;
}
else if (document.body) {
pos = document.body.scrollTop;
}
pos = pos - tips.offsetTop + theTop;
pos = tips.offsetTop + pos / 10;
if (pos < theTop) pos = theTop;
if (pos != old) {
tips.style.top = pos + "px";
tt = 10;
}
old = pos;
setTimeout(moveTips, tt);
}
moveTips();
});
};
$.fn.qqFloat.defaults = {
hiddenObj: '.qqonline',
showObj: '.qqInfo',
leftOrRight: 'right'
};
})(jQuery);
jQuery(document).ready(function() {
$("#floatbox").qqFloat({ leftOrRight: "right", defaultX:0,defaultY: 90 });
jQuery("#floatbox").css("width", "151px");
jQuery(".content-box").css("width", "120px");
jQuery('.QQ_close').click(function() {
var width = jQuery('.content-box').width();
if (width == 0) {
jQuery("#floatbox").css("width", "151px");
jQuery('.content-box').animate({ width: 120 }, 500);
} else {
jQuery('.content-box').animate({ width: 0 }, 500, function() { jQuery("#floatbox").css("width", "31px"); });
}
});
})