Get the jQuery Version
Many JavaScript frameworks provide a version
property on their main object, providing a quick bit of important information about the framework. The main jQuery object doesn't provide this property, however, so developers need to do a bit more work to get that version information. Here's how to get the jQuery version number for a given jQuery script!
The jQuery JavaScript
The jQuery version lives within jQuery.fn
:
var v = jQuery.fn.jquery;
/*
You may also use:
var v = jQuery().jquery; // "1.4.2"
*/
The jquery
property of the jQuery.fn
object provides the version number as a string. Not as easy as .version
access, but provides the jQuery version nonetheless!
My first professional web development was at a small print shop where I sat in a windowless cubical all day. I suffered that boxed in environment for almost five years before I was able to find a remote job where I worked from home. The first...
MooTools has always gotten a bit of grief for not inherently using and standardizing namespaced-based JavaScript classes like the Dojo Toolkit does. Many developers create their classes as globals which is generally frowned up. I mostly disagree with that stance, but each to their own. In any event...
Last week I covered a smooth, subtle MooTools effect called Kwicks. Another great MooTools creation is the Accordion, which acts like...wait for it...an accordion! Now I've never been a huge Weird Al fan so this is as close to playing an accordion as...
Mozilla Aurora 11 was recently released with a bevy of new features. One of those great new features is their initial implementation of the Battery Status API. This simple API provides you information about the battery's current charge level, its...