鼠标移动事件

***********************************jquery

input.prototype.initHelpTip = function(){
    $(".helpTip img").mouseover(function(){
        this.tip = layer.tips(($(this).next().html()==undefined?"暂无说明":$(this).next().html()), this, {guide:1 ,maxWidth:240,style: ['text-align:left;border:1px solid #FEF9F0; background-color:#FEF9F0; color:#333', '#FEF9F0']});
    }).mouseout(function(){
        layer.close(this.tip);  
    });
    //鼠标经过事件 ,移动到被保人出提示
    $(document).ready(function(){
        $(".helpTip").mouseover(function(){
            $(this).find(".helpTip")
            this.tip = layer.tips(($(this).children().next().html()==undefined?"暂无说明":$(this).children().next().html()), this, {guide:1 ,maxWidth:240,style: ['text-align:left;border:1px solid #FEF9F0; background-color:#FEF9F0; color:#333', '#FEF9F0']});
        }).mouseout(function(){
            layer.close(this.tip);  
        });
    });
};



*******************************第二种可以,点击的

input.prototype.initHelpTip = function(){
    var tip = undefined;//临时变量 用于函数外调用
    //鼠标经过事件
    $(".helpTip").mouseover(function(){
        tip = this;
        this.tip = layer.tips(($(this).children().next().html()==undefined?"暂无说明":$(this).children().next().html()), this, {guide:1 ,maxWidth:240,style: ['text-align:left;border:1px solid #FEF9F0; background-color:#FEF9F0; color:#333', '#FEF9F0']});
    });
    //点击空白处事件
    $(document).click(function(e){
        var target = $(".helpTip");//激活区域
        var tip_layer = $(".xubox_layer");//提示区域
        //判断点击处是否不存在于目标区域中
        if((!target.is(e.target) && target.has(e.target).length === 0)
                && (!tip_layer.is(e.target) && tip_layer.has(e.target).length === 0)){
            layer.close(tip.tip);
        }
    });
};

**********************************jsp

<div class="defalut-model-title">提示搜索
        <span class="helpTip">
            什么是钱江搜索
            <img src="${ctx }/sale/template/default/images/default-help.gif">
            <span style="display: none;" >
               要提示的信息是这儿
            </span>    
        </span>
            
    </div>


**************

鼠标经过(什么是钱江搜索)(img)的时候提示(     要提示的信息是这儿)

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值