Backwards Support for $.live() and $.browser()

Share this article

Quick code snippets from the jQuery Migrate Plugin. I recommend using the full migrate plugin but if you want specifics for $.live() and $.browser() see below.

var oldLive =; = function( types, data, fn ) {
    // migrateWarn(" is deprecated");
    if ( oldLive ) {
        return oldLive.apply( this, arguments );
    jQuery( this.context ).on( types, this.selector, data, fn );
    return this;


var browser;

jQuery.uaMatch = function( ua ) {
ua = ua.toLowerCase();

var match = /(chrome)[ /]([w.]+)/.exec( ua ) ||
/(webkit)[ /]([w.]+)/.exec( ua ) ||
/(opera)(?:.*version|)[ /]([w.]+)/.exec( ua ) ||
/(msie) ([w.]+)/.exec( ua ) ||

Sam DeeringSam Deering
View Author

Sam Deering has 15+ years of programming and website development experience. He was a website consultant at Console, ABC News, Flight Centre, Sapient Nitro, and the QLD Government and runs a tech blog with over 1 million views per month. Currently, Sam is the Founder of Crypto News, Australia.

Share this article
Read Next
Get the freshest news and resources for developers, designers and digital creators in your inbox each week