Определения браузера от Gareth Heyes:
//Firefox detector 2/3 by DoctorDan
FF=/a/[-1]=='a'
//Firefox 3
FF3=(function x(){})[-5]=='x'
//Firefox 2
FF2=(function x(){})[-6]=='x'
//IE
IE='\v'=='v'
//Safari
Saf=/a/.__proto__=='//'
//Chrome
Chr=/source/.test((/a/.toString+''))
Всё вместе:
B=(function x(){})[-5]=='x'?'FF3':(function x(){})[-6]=='x'?'FF2':'\v'=='v'?'IE':/a/.__proto__=='//'?'Saf':/s/.test(/a/.toString)?'Chr':'Op';
Тип браузера можно посмотреть в строке User Agent. Для Google Chrome она выглядит следующим образом:
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US) AppleWebKit/525.13 (KHTML, like Gecko) Chrome/0.2.149.27 Safari/525.13
Следовательно, проверку выполняем следующим образом:
var is_chrome = false, chrome_version = false; if(navigator.userAgent.toLowerCase().indexOf('chrome') > -1) { is_chrome = true; chrome_version = navigator.userAgent.replace(/^.*Chrome\/([\d\.]+).*$/i, '$1') }
В результате переменные is_chrome и chrome_version будут указывать на то, является ли браузер Google Chrome и какая у него версия.
This is a jQuery plugin which enables you to preload images mentioned in CSS.
It is useful to prevent the flickering & loading period happens when an image is being loaded at rollover states, Ajax loaders, toggle effects & more.

The plugin can pull any image in the CSS independent from the folders they are placed in.
Tip:
Here is a version of this image preloading script ported to Prototype.
Advertisements:
Free Website Magazine For Web Designers & Developers.
CSSRockstars — PSD To XHTML($149) — Wordpress To XHTML($219)

Tags: Css, Javascript, jQuery, Prototype
Related posts

Sypex Dumper — это PHP-скрипт, с помощью которого можно просто и быстро создать резервную копию базы данных MySQL, а также восстановить в случае необходимости базу данных из резервной копии.
Sypex Dumper — is PHP-script, which can quickly and easily create backup database MySQL, and if necessary to restore the database from the backup.
CodeIgniter version 1.6.2 has been officially released. This release includes more than 29 bug fixes and 34 feature additions and enhancements. Among these are some improvements to Active Record and transactional database interaction, the introduction of a constants file, improvements to the Zip library, a Compatibility Helper, new features to the File Helper, the removal of closing PHP tags from the framework files, and many other goodies. Checkout the Change log for the full details!
Paired with this release is the introduction of Tags in the Subversion server for version snapshots. CLI geeks, starting with version 1.6.1, you can checkout/export full release versions directly from Subversion. Details can be found on the downloads page. As always, check the simple upgrade instructions if you are running a previous version of CodeIgniter.