首页 > 语言 > JavaScript > 正文

Jquery右下角抖动、浮动 实例代码(兼容ie6、FF)

2024-05-06 15:50:39
字体:
来源:转载
供稿:网友
本实例结合了jquery+js中的setTimeout函数实现了一直浮动在页面右下解的广告,有需要的朋友可以参考一下

复制代码 代码如下:


setTimeout("document.getElementById('qq_dd').style.display='block'; ",5000);
// JavaScript Document
$(function(){
    if($.browser.msie&&$.browser.version=="6.0"&&$("html")[0].scrollHeight>$("html").height())
        $("html").css("overflowY","scroll");
        $("html").css("overflowX","hidden");
});
function right_down(){
document.writeln("<div><div><img src='closed_fk.jpg'onclick="_gaq.push(['_trackEvent', 'QQDD', 'Click', '关闭']);" /><a href='#'  target='_blank'><img src='jieshou_fk.jpg' /></a><span><img src='jujue_fk.jpg' /></span></div></div>")
}
right_down();
$("#guanbi").click(function(){
$("#my_img").hide();
});
$("#guanbi0").click(function(){
$("#my_img").hide();
});
function rattleimage(){$("#my_img").animate({top:'+=3'},50);$("#my_img").animate({left:'+=3'},50);$("#my_img").animate({top:'-=3'},50);$("#my_img").animate({left:'-=3'},50);$("#my_img").animate({top:'+=3'},50);$("#my_img").animate({left:'+=3'},50);$("#my_img").animate({top:'-=3'},50);$("#my_img").animate({left:'-=3'},50);$("#my_img").animate({top:'+=3'},50);$("#my_img").animate({left:'+=3'},50);$("#my_img").animate({top:'-=3'},50);$("#my_img").animate({left:'-=3'},50);$("#my_img").animate({top:'+=3'},50);$("#my_img").animate({left:'+=3'},50);$("#my_img").animate({top:'-=3'},50);$("#my_img").animate({left:'-=3'},50);$("#my_img").animate({top:'+=3'},50);$("#my_img").animate({left:'+=3'},50);$("#my_img").animate({top:'-=3'},50); $("#my_img").animate({left:'-=3'},50);$("#my_img").fadeOut("slow");$('#my_img').fadeIn('slow');setTimeout("rattleimage()",10000);}
rattleimage();

发表评论 共有条评论
用户名: 密码:
验证码: 匿名发表

图片精选