Changing jQuery.delegate to jQuery.on as jQuery.delegate has been superseded by jQuery.on