<td>9;00-18:00(节假日 20;00)<img class="st_img_hover" src="/static/admin/images/u645.png"></td>
  var bigImg = document.createElement("div");
    var img0 = document.createElement("img");
    bigImg.appendChild(img0);
    $(bigImg).attr("class", "bigImg").hide();
    document.body.appendChild(bigImg);
    //图片hover放大显示
    $(document).on("mouseover", ".st_img_hover", function(event) {
        var event = event || window.event;
        var dX = parseFloat(event.clientX) + 10;
        var dY = parseFloat(event.clientY);
        var imgSrc = $(this).attr("data-src") || $(this).attr("src");
        $(".bigImg").show().css({
            "left": dX,
            "top": dY
        }).find("img").attr("src", imgSrc);
    });
    $(document).on("mousemove", ".st_img_hover", function(event) {
        var event = event || window.event;
        var dX = parseFloat(event.clientX) + 10;
        var dY = event.clientY;
        $(".bigImg").show().css({
            "left": dX,
            "top": dY
        });
    });
    $(document).on("mouseout", ".st_img_hover", function() {
        $(".bigImg").hide();
    });

 

posted on 2018-07-02 10:09  刘世涛6192  阅读(222)  评论(0编辑  收藏  举报