$(function () { $("#izl_rmenu").each(function () { $(this).find(".btn-wx").mouseenter(function () { $(this).find(".pic").fadein("fast"); }); $(this).find(".btn-wx").mouseleave(function () { $(this).find(".pic").fadeout("fast"); }); $(this).find(".btn-phone").mouseenter(function () { $(this).find(".phone").fadein("fast"); }); $(this).find(".btn-phone").mouseleave(function () { $(this).find(".phone").fadeout("fast"); }); $(this).find(".btn-qq").mouseenter(function () { $(this).find(".qq").fadein("fast"); }); $(this).find(".btn-qq").mouseleave(function () { $(this).find(".qq").fadeout("fast"); }); $(this).find(".btn-top").click(function () { $("html, body").animate({ "scroll-top": 0 }, "fast"); }); }); var lastrmenustatus = false; $(window).scroll(function () {//bug var _top = $(window).scrolltop(); if (_top > 200) { $("#izl_rmenu").data("expanded", true); } else { $("#izl_rmenu").data("expanded", false); } if ($("#izl_rmenu").data("expanded") != lastrmenustatus) { lastrmenustatus = $("#izl_rmenu").data("expanded"); if (lastrmenustatus) { $("#izl_rmenu .btn-top").slidedown(); } else { $("#izl_rmenu .btn-top").slideup(); } } }); }); function check2() { if (document.payment.pname.value.length == 0||document.payment.pname.value=="姓名") { alert("姓名不能为空."); document.payment.pname.focus(); return false; } if (document.payment.phone.value.length == 0||document.payment.phone.value=="电话") { alert("电话不能为空."); document.payment.phone.focus(); return false; } if (document.payment.content.value.length == 0||document.payment.content.value=="内容") { alert("留言信息不能为空."); document.payment.content.focus(); return false; } return true; } //$(window).scroll(function(){ //if ($('#head').length) { //var strickyscrollpos = 100; //if($(window).scrolltop() > strickyscrollpos) { //$('#head').removeclass('animated fadeindown'); //$('#head').addclass('animated slideindown stricky-fixed'); //} //else if($(this).scrolltop() <= strickyscrollpos) { //$('#head').removeclass('animated slideindown stricky-fixed'); //$('#head').addclass('animated fadeindown'); //} //}; //});