现在的位置: 首页 > 综合 > 正文

jquery 给连接上面加上hot图标

2013年11月30日 ⁄ 综合 ⁄ 共 360字 ⁄ 字号 评论关闭

 

 <a href="~/search_list.aspx?seachbyproducttype=true&key=特种" class="hot">特种</a>

 

 $(".hot").each(function () {
        var _this = $(this);
        var hotimg =$("<img src='~/jksc/images/hot.gif' />");
        hotimg.css("position","absolute");
        var offset = _this.offset();
        hotimg.css("top",offset.top - _this.height());
        hotimg.css("left",offset.left);
        $("body").append(hotimg);  
    })

只要使用了hot样式的元素上面都会出现一个hot图标..

抱歉!评论已关闭.