ToMoral.CRM/JS/script.js

(开头部分) 3KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

$(document).ready(function () {
    /* This code is executed after the DOM has been completely loaded */

    var tmp;

    $('.note').each(function () {
        /* Finding the biggest z-index value of the notes */
        tmp = $(this).css('z-index');
        if (tmp > zIndex) zIndex = tmp;
    })


    /* A helper function for converting a set of elements to draggables: */
    make_draggable($('.note'));

    /* Configuring the fancybox plugin for the "Add a note" button: */
    $("#addButton").fancybox({
        'zoomSpeedIn': 600,
        'zoomSpeedOut': 500,
        'easingIn': 'easeOutBack',
        'easingOut': 'easeInBack',
        'hideOnContentClick': false,
        'padding': 15
    });



    $('#editNote').fancybox();

    /* Listening for keyup events on fields of the "Add a note" form: */
    $('.pr-body,.pr-author').live('keyup', function (e) {
        if (!this.preview)
            this.preview = $('#fancy_ajax .note');

        /* Setting the text of the preview to the contents of the input field, and stripping all the HTML tags: */
        this.preview.find($(this).attr('class').replace('pr-', '.')).html($(this).val().replace(/<[^>]+>/ig, ''));
    });

    /* Changing the color of the preview note: */
    $('.color').live('click', function () {
        $('#fancy_ajax .note').removeClass('yellow green blue').addClass($(this).attr('class').replace('color', ''));
    });

    /* The submit button: */
    $('#note-submit').live('click', function (e) {

        if ($('.pr-body').val().length < 1) {
            alert("不能少于1个字符!")
            return false;
        }

        //if ($('.pr-author').val().length < 1) {
        //    alert("You haven't entered your name!")
        //    return false;
        //}

        $(this).replaceWith('<img src="img/ajax_load.gif" style="margin:30px auto;display:block" />');

        var top = parseInt( Math.random() * 300);
        var left = parseInt( Math.random() * 800);
后面还有 53 行代码,购买后查看完整代码

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

AI 解读

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

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