js/jquery.careyTip.js

(完整代码) 1KB

//Made By CareySon
//2009.6.24
//欢迎使用  QQ:5817141
jQuery.fn.careyTip = function(content) {
    $("body").append('<div id="bubble_tooltip" style="display: none; left: 379px; top: 62px;"><div class="bubble_top"></div><div class="bubble_middle"><span id="bubble_tooltip_content">&nbsp;</span></div><div class="bubble_bottom"></div></div>');
    $(this).each(function() {
        $(this).mouseover(function() {
            showme(content, this);
        });
        $(this).mouseout(function() { 
            $("#bubble_tooltip").hide();
        });
    });
}
function showme(txt, me)
{
   $("#bubble_tooltip_content").html(txt);
   $("#bubble_tooltip").css({display: 'block',top: $(me).offset().top - $("#bubble_tooltip").height() + 5, left: $(me).offset().left - ($("#bubble_tooltip").width() - 50)});

}
//讲过滤viewstate的方法扩展也放到这
$.fn.serializeNoViewState = function() { return this.find("input,textarea,select,hidden").not("[type=hidden][name^=__]").serialize(); }


//只能输入数字
jQuery.fn.onlyNum = function(num) {
    $(this).css({ imeMode: "disabled", '-moz-user-select': "none" });
    $(this).bind("keypress", function(e) {
        if (e.ctrlKey == true || e.shiftKey == true||this.value.length>=parseInt(num))
            return false;
        if ((e.which >= 48 && e.which <= 57 && e.ctrlKey == false && e.shiftKey == false) || e.which == 0 || e.which == 8)
            return true;
        else if (e.ctrlKey == true && (e.which == 99 || e.which == 118))
            return false;
        else
            return false;
    })
 .bind("contextmenu", function() { return false; })
 .bind("selectstart", function() { return false; })
 .bind("drop", function() { return false; })
 .bind("paste", function() { return false; });
};

24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明

AI 解读 AI

登录后可用,每次 10 算力,解读结果公开显示在下面。

还没有人解读过这个文件。