Bug Tracker

Ticket #1310 (closed enhancement: worksforme)

Opened 1 year ago

Last modified 2 months ago

Add easily accessible version info to jQuery core

Reported by: joern Assigned to: joern
Type: enhancement Priority: minor
Milestone: 1.2.4 Component: core
Version: 1.1.2 Keywords:
Cc: Needs: Commit

Description

Currently jQuery's version can be accessed via jQuery.fn.jquery. I propose this patch:

Index: D:/dev/workspace/jquery/src/jquery/jquery.js
===================================================================
--- D:/dev/workspace/jquery/src/jquery/jquery.js	(revision 2128)
+++ D:/dev/workspace/jquery/src/jquery/jquery.js	(working copy)
@@ -37,6 +37,9 @@
 // Map the jQuery namespace to the '$' one
 var $ = jQuery;
+// create static version reference
+jQuery.version = "@VERSION";
+
 /**
  * This function accepts a string containing a CSS or
  * basic XPath selector which is then used to match a set of elements.

Attachments

Change History

Changed 4 months ago by flesler

  • owner set to joern
  • milestone changed from 1.1.3 to 1.2.4

Is this really needed ? uhmm...

Changed 2 months ago by joern

  • status changed from new to closed
  • resolution set to worksforme

The difference between jQuery.version and jQuery.fn.version is really not worth the trouble.

Note: See TracTickets for help on using tickets.