jQuery Version
- 授权协议: 未知
- 开发语言:
- 操作系统: 未知
- 软件首页: http://plugins.jquery.com/project/jqueryversion
软件介绍
A Plugin to help determine the version of jQuery.
Code:
function jQueryVersion()
{
var ver = (new jQuery()).jquery;
// if there are two .'s it is a bug fix release
if(ver.match(/\./g).length == 2)
{
return {
"version" : ver,
"major" : ver.substr(0, ver.indexOf(".")),
"minor" : ver.substr(ver.indexOf(".") + 1, ver.lastIndexOf(".") - ver.indexOf(".") - 1),
"revision" : ver.substr(ver.lastIndexOf(".") + 1)
}
}
// otherwise it is an initial release
else
{
return {
"version" : ver,
"major" : ver.substr(0, ver.indexOf(".")),
"minor" : ver.substr(ver.indexOf(".") + 1),
"revision" : 0
}
}
}Usage example:
jQuery.fn.myplugin = function()
{
var version = jQueryVersion();
if(parseInt(version.minor) < 1)
{
alert("jQuery version 1.1 or higher is required for myplugin");
return this;
}
}Programming in Haskell
Graham Hutton / Cambridge University Press / 2007-1-18 / GBP 34.99
Haskell is one of the leading languages for teaching functional programming, enabling students to write simpler and cleaner code, and to learn how to structure and reason about programs. This introduc......一起来看看 《Programming in Haskell》 这本书的介绍吧!
