Hi,
I have copied your code and pasted in HTML file. But it is not working. However, I found 2 links which tells how to detect browsers.
http://jquerybyexample.blogspot.com/2010/08/jquery-tip-how-to-detect-browsers.html[
^]
http://jquerybyexample.blogspot.com/2010/09/how-to-detect-chrome-using-jquery.html[
^]
Hope this helps.
Thanks,
Virendra Dugar