通知栏并添加浏览器过时的脚本

I am currently working on a notification bar http://jsfiddle.net/nZe8t/ and I would like to add a browser out-date message script which detects if the used browser is up to date.

The action to show the bar is currently applied to a button, but I want the notification bar to appear when it detects an out-dated browser.

As you're using jQuery you can use jQuery.browser to detect what type and which version of browser the user is viewing the site with. If you add a check into your domready event, you can detect the version there and show the warning message if needed.

Hiding the message when clicking any link is as simple as adding an onclick event to the body on all A elements and hiding the warning message if it is being shown when the event is fired.

jQuery("body a").click(function(){/*hide messages*/})

jQuery.browser: http://api.jquery.com/jQuery.browser/

Example:

if (jQuery.browser.msie && jQuery.browser.version=="6.0") {
    //show the warning box, the user is using IE6!
}