views:

9285

answers:

8
+32  Q: 

jquery 1.4.2 vsdoc

anybody know where i can get the vsdoc for jquery 1.4.2?

+20  A: 

You always get it from http://docs.jquery.com/Downloading_jQuery - if it's not there yet, it's not available yet. v1.4.1 exists - see screenshot - but 1.4.2 isn't ready yet.

alt text

marc_s
According to a comment to a post today, Scott Guthrie is "following up with the team to understand what the latest status is on that." See http://weblogs.asp.net/scottgu/archive/2010/10/04/jquery-templates-data-link-and-globalization-accepted-as-official-jquery-plugins.aspx#7623375 Hopefully that means we'll see it at the above shortly.
James Skemp
+2  A: 

For the time being you could always just rename "jquery-1.4.1-vsdoc.js" to "jquery-1.4.2-vsdoc.js" and when they release the new vsdoc version just replace it.

Note: I had to then modify the script source path and then change it back again to force vs to pick up the vsdoc. I just added a forward slash at the start of the src attribute value and then removed it.

Mr Grok
+6  A: 

as well as renaming the vsdoc file (1.4.1) you may also have to change the jQuery version number used in the 1.4.1-vsdoc.js file to 1.4.2.

see line# 224

// The current version of jQuery being used
    jquery: "1.4.2",
mahmud khaled
+24  A: 

The adventurous can add the following lines starting at 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 );
    }
},

That documentation is pretty much ripped from jQuery web pages and from current definitions of "live" and "die", but feel free to adjust as you see fit.

Also, at line 224:

// The current version of jQuery being used
    jquery: "1.4.2",
Herb
Excellent! +1 for research
Atømix
If it's this easy, seriously, why is there *still* not a Visual Studio link on jQuery.com, or Microsoft's CDN (http://www.asp.net/ajaxlibrary/cdn.ashx) ? (I realize this is more of a rant, but it would be beneficial to know, if someone knows and can share.)
James Skemp
If jQuery devs were lazy, they could release a new version and not make Visual Studio documentation, as the community would just make it for them :)
Maxim Zaslavsky
I created a 1.4.2 version based on all of the answers to the question - you can download it from http://static.maximzaslavsky.com/jquery-1.4.2-vsdoc.js
Maxim Zaslavsky
@James Skemp - MS just tends to lose interest in this sort of stuff after they get all excited about it at the outset. Look at their framework reference source for a similar example. Apparently the key personnel move within the organisation and no-one else cares to keep things running.
Will Dean
@Will Dean - I guess I'll wait until the next version (1.5) comes out. While unfortunate, I'd much rather belief that they haven't given up on jQuery just quite yet, and rather saw the 1.4.2 release as minor enough not to update the vsdoc. It's difficult to deny that jQuery isn't one of the more popular libraries, so I can't see it making business sense to drop it so suddenly. Since it's bundled with new MVC projects, perhaps we should ask Scott Gu/Ha ...
James Skemp
You may be right, but I'm more cynical, I'm afraid. My experience is that Scott Ha will be embarrassed on behalf of MS, but that won't be enough to get it fixed. Funny enough, in April 2009, I said "how many releases is JQuery intellisense annotation going to last for, do we all think?" in a comment on ScottHa's blog. The answer was of course '2 major releases'. You wait to see what (doesn't) happen to MVC if/when Haack moves on...
Will Dean
+12  A: 

Just a note on Herb's answer. Line 2940, for me anyway, was in the middle of the 'trigger' method. I inserted the code after 2949. Also, since it took me about 45 minutes to figure out why the comments weren't working for those two new routines - the "summary" tags have one too many 'm's in them!

Here's the corrected version:

        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);
        }
    },
John T
For me also, it was line 2949.
Patrick Karcher
Thanks John. I was a little worried when I went to 2940 and saw that line was in the middle of the trigger.
Chris Lively
+4  A: 

I decided to create one based on the input from this question & answers and share it. You can download it from this blog post:

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

Hope that helps!

Christopher Hujanen
Thanks for your work!
Henrik
+8  A: 

Not sure if it is the "official version" but now a 1.4.2-vsdoc file can be downloaded from the Microsoft CDN: http://ajax.microsoft.com/ajax/jQuery/jquery-1.4.2-vsdoc.js

blueling
I think there may be errors with this file. If I use $(document).ready, I get an error on line 486: readyBound is not defined.
Josh Santangelo
Yeah, I compared it to the jquery-1.4.2.min-vsdoc.js that I created, using the above edits, and it's very different - missing lots of routines.
John T
A: 

Looks like they have added the 1.4.2 to the JQuery download page:

http://docs.jquery.com/Downloading_jQuery

NM was looking in the wrong spot

Terry
No link to the vsdoc-file for 1.4.2 on that page, only for 1.4.1
Espenhh