jQuery 1.4.2 VSDoc

Где я могу получить VSDoc для jQuery 1.4.2?

40
задан Peter Mortensen 6 June 2011 в 15:46
поделиться

7 ответов

Вы всегда получаете его из http://docs.jquery.com/Downloading_jQuery - если его еще нет, значит, он недоступен еще. v1.4.1 существует - см. снимок экрана - но 1.4.2 еще не готова.

alt text

23
ответ дан 27 November 2019 в 01:20
поделиться

На данный момент вы всегда можете просто переименовать "jquery-1.4.1-vsdoc.js" в "jquery-1.4.2-vsdoc.js" и когда они выпустят новую версию vsdoc, просто замените ее.

Примечание. Затем мне пришлось изменить исходный путь сценария, а затем снова изменить его, чтобы заставить vs забрать vsdoc. Я просто добавил косую черту в начале значения атрибута src, а затем удалил его.

2
ответ дан 27 November 2019 в 01:20
поделиться

Помимо переименования файла VSDoc (1.4.1) вам, возможно, также придется изменить номер версии jQuery, используемый в 1.4.1-vsdoc.js файл в 1.4.2.

См. Строку № 224,

// The current version of jQuery being used
    jquery: "1.4.2",
6
ответ дан 27 November 2019 в 01:20
поделиться

Любители приключений могут добавить следующие строки, начиная с 2949:

delegate: function( selector, types, data, fn ) {
/// <summary>
///   Attach a handler to one or more events for all elements that match the selector, now or in the future, based on a specific set of root elements. See also "live".
/// </summary>
/// <param name="selector" type="String">
///     An expression to search with.
/// </param>
/// <param name="types" type="String">
///     A string containing a JavaScript event type, such as "click" or "keydown".
/// </param>
/// <param name="data" type="Object">
///     A map of data that will be passed to the event handler.
/// </param>
/// <param name="fn" type="Function">
///     A function to execute at the time the event is triggered.
/// </param>
    return this.live( types, data, fn, selector );
},
undelegate: function( selector, types, fn ) {
/// <summary>
///   Remove a handler from the event for all elements which match the current selector, now or in the future, based upon a specific set of root elements. See also "die".
/// </summary>
/// <param name="selector" type="String">
///     An expression to search with.
/// </param>
/// <param name="types" type="String">
///     A string containing a JavaScript event type, such as "click" or "keydown".
/// </param>
/// <param name="data" type="Object">
///     A map of data that will be passed to the event handler.
/// </param>
/// <param name="fn" type="Function">
///     A function to execute at the time the event is triggered.
/// </param>
    if ( arguments.length === 0 ) {
            return this.unbind( "live" );

    } else {
        return this.die( types, null, fn, selector );
    }
},

Эта документация в значительной степени взята из веб-страниц jQuery и текущих определений «жить» и «умереть», но не стесняйтесь вносить изменения по своему усмотрению.

Кроме того, в строке 224:

// The current version of jQuery being used
    jquery: "1.4.2",
27
ответ дан 27 November 2019 в 01:20
поделиться

Просто примечание к ответу Херба. Строка 2940, во всяком случае, для меня находилась в середине метода «триггера». Я вставил код после 2949. Кроме того, поскольку мне потребовалось около 45 минут, чтобы выяснить, почему комментарии не работают для этих двух новых подпрограмм - в тегах «сводки» слишком много m!

Вот исправленная версия:

        delegate: function(selector, types, data, fn) {
    /// <summary>
    ///     Attach a handler to one or more events for all elements that match the selector, now or in the future, based on a specific set of root elements. See also "live".
    /// </summary>
    /// <param name="types" type="String">
    ///     A string containing a JavaScript event type, such as "click" or "keydown".
    /// </param>
    /// <param name="data" type="Object">
    ///     A map of data that will be passed to the event handler.
    /// </param>
    /// <param name="fn" type="Function">
    ///     A function to execute at the time the event is triggered.
    /// </param>
    /// <param name="selector" type="String">
    ///     An expression to search with.
    /// </param>

        return this.live(types, data, fn, selector);
    },

    undelegate: function(selector, types, fn) {
    /// <summary>
    ///     Remove a handler from the event for all elements which match the current selector, now or in the future, based upon a specific set of root elements. See also "die".
    /// </summary>
    /// <param name="selector" type="String">
    ///     An expression to search with.
    /// </param>
    /// <param name="types" type="String">
    ///     A string containing a JavaScript event type, such as "click" or "keydown".
    /// </param>
    /// <param name="fn" type="Function">
    ///     A function to execute at the time the event is triggered.
    /// </param>
        if (arguments.length === 0) {
            return this.unbind("live");

        } else {
            return this.die(types, null, fn, selector);
        }
    },
12
ответ дан 27 November 2019 в 01:20
поделиться

Я решил создать одну программу на основе ответов на этот вопрос и поделиться ею. Вы можете скачать его из этой записи блога:

http://hugeonion.com/2010/06/26/here-is-the-missing-jquery-1-4-2-vsdoc-file/

Надеюсь, это поможет!

6
ответ дан 27 November 2019 в 01:20
поделиться

Не уверен, что это "официальная версия", но теперь файл 1.4.2-vsdoc можно загрузить с Microsoft CDN: http://ajax.microsoft.com/ajax/jQuery/jquery-1.4.2-vsdoc.js

9
ответ дан 27 November 2019 в 01:20
поделиться
Другие вопросы по тегам:

Похожие вопросы: