xwxq.js 888 Bytes
$(function () {
    let Mydate = new Date()
    let year = Mydate.getFullYear();
    let minutes = Mydate.getMinutes()
    let hour = Mydate.getHours();
    let date = Mydate.getDate()
    let month = Mydate.getMonth();
    $('.date div:first-child').text(year)
    $('.date div:nth-child(2)').text(month + 1 + "/" + date)
    $('.date div:last-child').text(hour + ":" + minutes)
})
$(window).scroll(function () {
    let juli = $(document).scrollTop();
    if (juli > 360) {
        $('.left-left').addClass('middle_active');
    } else {
        $('.left-left').removeClass('middle_active');
    }
})
layui.use('element', function () {
    var element = layui.element; //导航的hover效果、二级菜单等功能,需要依赖element模块
    //监听导航点击
    element.on('nav(demo)', function (elem) {
        //console.log(elem)
        layer.msg(elem.text());
    });
});