Bug Tracker

Modify

Ticket #1310 (closed enhancement: worksforme)

Opened 6 years ago

Last modified 5 years ago

Add easily accessible version info to jQuery core

Reported by: joern Owned by: joern
Priority: minor Milestone: 1.2.4
Component: core Version: 1.1.2
Keywords: Cc:
Blocking: Blocked by:

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.

Change History

comment:1 Changed 5 years ago by flesler

  • Owner set to joern
  • Milestone changed from 1.1.3 to 1.2.4

Is this really needed ? uhmm...

comment:2 Changed 5 years 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.

Please follow the  bug reporting guidlines and use  jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.

View

Add a comment

Modify Ticket

Action
as closed
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.