anybody know where i can get the vsdoc for jquery 1.4.2?
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.
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.
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",
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",
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);
}
},
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!
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
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