日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 前端技术 > javascript >内容正文

javascript

html制作当当网首页的报告,当当网首页——JS代码

發(fā)布時間:2024/3/7 javascript 51 豆豆
生活随笔 收集整理的這篇文章主要介紹了 html制作当当网首页的报告,当当网首页——JS代码 小編覺得挺不錯的,現(xiàn)在分享給大家,幫大家做個參考.

$(function($){

//打開一個廣告窗口

window.open('open.html','','top=0,left=200,width=500,height=327,scrollbars=0,resizable=0');

//隨滾動條滾動的可關(guān)閉廣告窗口

$(window).scroll(function(){

var st = $(this).scrollTop()+50;

$("#right").css("top",st);

});

$("#right").find("a").click(function(){

$("#right").hide();

});

//輪換圖片

function changeImg(){

var index=0;

var stop=false;

var $li=$("#content").find("#scroll_img").children("li");

var $page = $("#content").find("#scroll_number").children("li");

$page.eq(index).addClass("scroll_number_over").stop(true,true).siblings().removeClass("scroll_number_over");

$page.mouseover(function(){

stop=true;

index=$page.index($(this));

$li.eq(index).stop(true,true).fadeIn().siblings().fadeOut();

$(this).addClass("scroll_number_over").stop(true,true).siblings().removeClass("scroll_number_over");

}).mouseout(function(){

stop=false;

});

setInterval(function(){

if(stop) return;

index++;

if(index>=$li.length){

index=0;

}

$li.eq(index).stop(true,true).fadeIn().siblings().fadeOut();

$page.eq(index).addClass("scroll_number_over").stop(true,true).siblings().removeClass("scroll_number_over");

},3000);

}

changeImg();

//Tab切換

$("#bookTab").children(".book_new").find("[id]").mouseover(function(){

var id = "#book_"+$(this).attr("id");

$("#bookTab").children(".book_class").find("[id]").hide();

$(this).addClass("book_type_out").siblings().removeClass("book_type_out");

$(id).show();

});

//內(nèi)容鼠標經(jīng)過效果

$("#bookTab").children(".book_class").find("dd").mouseover(function(){

$(this).css("border","2px solid #F96");

}).mouseout(function(){

$(this).css("border","2px solid #fff");

});

//書訊快遞循環(huán)垂直向上滾動

function movedome(){

var marginTop=0;

var stop=false;

var interval=setInterval(function(){

if(stop) return;

$("#express").children("li").first().animate({"margin-top":marginTop--},0,function(){

var $first=$(this);

if(!$first.is(":animated")){

if((-marginTop)>$first.height()){

$first.css({"margin-top":0}).appendTo($("#express"));

marginTop=0;

}

}

});

},50);

$("#express").mouseover(function(){

stop=true;

}).mouseout(function(){

stop=false;

});

}

movedome();

});

總結(jié)

以上是生活随笔為你收集整理的html制作当当网首页的报告,当当网首页——JS代码的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網(wǎng)站內(nèi)容還不錯,歡迎將生活随笔推薦給好友。