Floating online QQ Consulting service Code

Source: Internet
Author: User

In the recommendation of "QQ online customer service code can be dragged floating" and then recommended "QQ online consulting code up and down floating type", a friend asked me whether there is a simple floating online QQ consulting service code, in fact, I sold a xiaoguanzi said principle. Forget it or upload an online QQ consulting service Code demo image bar. Such as:

Looks very ugly, but this is very concise floating QQ customer service code, in fact, the most simple QQ online customer service code is still http://imis.qq.com/webpresence/code.shtml official, but can not float. Wait for a package download of the source program.

First look at the floating part of the code, this floaters function is to let a DIV element floating

function floaters () {http://www.hebby120.com

This.items = [];

This.additem = function (id,x,y,content) {

document.write ('

' +content+ ');

var newitem = {};

Newitem.object = document.getElementById (ID);

newitem.x = x;

Newitem.y = y;

This.items[this.items.length] = NewItem;

}

This.play = function () {

Collection = This.items

SetInterval (' Play () ', 10);

}

}

Then is the display part of the code, play this function is to control the online QQ consulting customer Service Code display:

function Play () {

if (screen.width<=800) {

for (Var i=0;i

Collection[i].object.style.display = ' None ';

}

Return

}

for (Var i=0;i

var followobj = Collection[i].object;

var followobj_x = (typeof (collection[i].x) = = ' string '? Eval (collection[i].x): collection[i].x);

var followobj_y = (typeof (collection[i].y) = = ' string '? Eval (collection[i].y): COLLECTION[I].Y);

if (followobj.offsetleft!= (document.body.scrollleft+followobj_x)) {

var dx= (document.body.scrollleft+followobj_x-followobj.offsetleft) *delta;

dx= (dx>0?1:-1) *math.ceil (math.abs (DX));

FOLLOWOBJ.STYLE.LEFT=FOLLOWOBJ.OFFSETLEFT+DX;

}

if (followobj.offsettop!= (document.body.scrolltop+followobj_y)) {

var dy= (document.body.scrolltop+followobj_y-followobj.offsettop) *delta;

Dy= (dy>0?1:-1) *math.ceil (Math.Abs (dy));

Followobj.style.top=followobj.offsettop+dy;http://www.hebckyy.com

}

FollowObj.style.display = ";

}

}

Floating online QQ Consulting service Code

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.