<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: jQuery.browser</title>
	<atom:link href="http://api.jquery.com/jQuery.browser/feed/" rel="self" type="application/rss+xml" />
	<link>http://api.jquery.com/jQuery.browser/</link>
	<description>jQuery API Reference</description>
	<lastBuildDate>Fri, 19 Aug 2011 09:06:00 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>By: Asd</title>
		<link>http://api.jquery.com/jQuery.browser/comment-page-1/#comment-8625</link>
		<dc:creator>Asd</dc:creator>
		<pubDate>Wed, 26 Jan 2011 15:41:53 +0000</pubDate>
		<guid isPermaLink="false">http://api.jquery.com/?p=425#comment-8625</guid>
		<description>it&#039;s correct, but it&#039;s Chrome not Safari...and i wanna read &quot;Chrome&quot;...not &quot;Safari&quot;...</description>
		<content:encoded><![CDATA[<p>it&#39;s correct, but it&#39;s Chrome not Safari&#8230;and i wanna read &#8220;Chrome&#8221;&#8230;not &#8220;Safari&#8221;&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: jsherk</title>
		<link>http://api.jquery.com/jQuery.browser/comment-page-1/#comment-8213</link>
		<dc:creator>jsherk</dc:creator>
		<pubDate>Sun, 09 Jan 2011 07:54:16 +0000</pubDate>
		<guid isPermaLink="false">http://api.jquery.com/?p=425#comment-8213</guid>
		<description>Thanks edeiller ... I used your code!&lt;br&gt;&lt;br&gt;I just added an extra var browser_name=&#039;whatever&#039; to each if and returned an array with brower name and version.</description>
		<content:encoded><![CDATA[<p>Thanks edeiller &#8230; I used your code!</p>
<p>I just added an extra var browser_name=&#39;whatever&#39; to each if and returned an array with brower name and version.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Thomtomdup</title>
		<link>http://api.jquery.com/jQuery.browser/comment-page-1/#comment-7027</link>
		<dc:creator>Thomtomdup</dc:creator>
		<pubDate>Tue, 16 Nov 2010 10:55:37 +0000</pubDate>
		<guid isPermaLink="false">http://api.jquery.com/?p=425#comment-7027</guid>
		<description>&lt;br&gt;I have add the google chrome detection in jquery.browser :&lt;br&gt;You add juste this in Useragent RegExp list :&lt;br&gt;&lt;br&gt;// Useragent RegExp&lt;br&gt;userAgent = navigator.userAgent,&lt;br&gt;rwebkit = /(webkit)[ /]([w.]+)/,&lt;br&gt;rchrome = /(chrome)[ /]([w.]+)/,&lt;br&gt;ropera = /(opera)(?:.*version)?[ /]([w.]+)/,&lt;br&gt;rmsie = /(msie) ([w.]+)/,&lt;br&gt;rmozilla = /(mozilla)(?:.*? rv:([w.]+))?/,&lt;br&gt;&lt;br&gt;&lt;br&gt;You modify uaMatch function :&lt;br&gt;&lt;br&gt;	uaMatch: function( ua ) {&lt;br&gt;		ua = ua.toLowerCase();&lt;br&gt;&lt;br&gt;		var match = rchrome.exec( ua ) &#124;&#124; rwebkit.exec( ua ) &#124;&#124;&lt;br&gt;			ropera.exec( ua ) &#124;&#124;&lt;br&gt;			rmsie.exec( ua ) &#124;&#124;&lt;br&gt;			ua.indexOf(&quot;compatible&quot;) &lt; 0 &amp;&amp; rmozilla.exec( ua ) &#124;&#124;&lt;br&gt;			[];&lt;br&gt;		alert(match[2]);&lt;br&gt;		return { browser: match[1] &#124;&#124; &quot;&quot;, version: match[2] &#124;&#124; &quot;0&quot;};&lt;br&gt;	},&lt;br&gt;&lt;br&gt;	browser: {}&lt;br&gt;});&lt;br&gt;&lt;br&gt;If you want have the browser language, you modify the return data of uaMatch function like this :&lt;br&gt;		return { browser: match[1] &#124;&#124; &quot;&quot;, version: match[2] &#124;&#124; &quot;0&quot;, language: navigator.language? navigator.language : navigator.userLanguage &#124;&#124; &quot;&quot; };&lt;br&gt;&lt;br&gt;and also modify this : &lt;br&gt;browserMatch = jQuery.uaMatch( userAgent );&lt;br&gt;if ( browserMatch.browser ) {&lt;br&gt;	jQuery.browser[ browserMatch.browser ] = true;&lt;br&gt;	jQuery.browser.version = browserMatch.version;&lt;br&gt;	jQuery.browser.language = browserMatch.language;	&lt;br&gt;}&lt;br&gt;&lt;br&gt;That&#039;s all.&lt;br&gt;Thanks</description>
		<content:encoded><![CDATA[<p>I have add the google chrome detection in jquery.browser :<br />You add juste this in Useragent RegExp list :</p>
<p>// Useragent RegExp<br />userAgent = navigator.userAgent,<br />rwebkit = /(webkit)[ /]([w.]+)/,<br />rchrome = /(chrome)[ /]([w.]+)/,<br />ropera = /(opera)(?:.*version)?[ /]([w.]+)/,<br />rmsie = /(msie) ([w.]+)/,<br />rmozilla = /(mozilla)(?:.*? rv:([w.]+))?/,</p>
<p>You modify uaMatch function :</p>
<p>	uaMatch: function( ua ) {<br />		ua = ua.toLowerCase();</p>
<p>		var match = rchrome.exec( ua ) || rwebkit.exec( ua ) ||<br />			ropera.exec( ua ) ||<br />			rmsie.exec( ua ) ||<br />			ua.indexOf(&#8220;compatible&#8221;) &lt; 0 &amp;&amp; rmozilla.exec( ua ) ||<br />			[];<br />		alert(match[2]);<br />		return { browser: match[1] || &#8220;&#8221;, version: match[2] || &#8220;0&#8243;};<br />	},</p>
<p>	browser: {}<br />});</p>
<p>If you want have the browser language, you modify the return data of uaMatch function like this :<br />		return { browser: match[1] || &#8220;&#8221;, version: match[2] || &#8220;0&#8243;, language: navigator.language? navigator.language : navigator.userLanguage || &#8220;&#8221; };</p>
<p>and also modify this : <br />browserMatch = jQuery.uaMatch( userAgent );<br />if ( browserMatch.browser ) {<br />	jQuery.browser[ browserMatch.browser ] = true;<br />	jQuery.browser.version = browserMatch.version;<br />	jQuery.browser.language = browserMatch.language;	<br />}</p>
<p>That&#39;s all.<br />Thanks</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Benny Born</title>
		<link>http://api.jquery.com/jQuery.browser/comment-page-1/#comment-6934</link>
		<dc:creator>Benny Born</dc:creator>
		<pubDate>Fri, 12 Nov 2010 06:23:56 +0000</pubDate>
		<guid isPermaLink="false">http://api.jquery.com/?p=425#comment-6934</guid>
		<description>If you want to know if its really a safari and not a chrome put this hack into your code&lt;br&gt;&lt;br&gt;$.browser.safari = ( $.browser.safari &amp;&amp; /chrome/.test(navigator.userAgent.toLowerCase()) ) ? false : true;</description>
		<content:encoded><![CDATA[<p>If you want to know if its really a safari and not a chrome put this hack into your code</p>
<p>$.browser.safari = ( $.browser.safari &amp;&amp; /chrome/.test(navigator.userAgent.toLowerCase()) ) ? false : true;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Kaushik Shah</title>
		<link>http://api.jquery.com/jQuery.browser/comment-page-1/#comment-11993</link>
		<dc:creator>Kaushik Shah</dc:creator>
		<pubDate>Fri, 30 Jul 2010 05:39:00 +0000</pubDate>
		<guid isPermaLink="false">http://api.jquery.com/?p=425#comment-11993</guid>
		<description>Weird, on Chrome (ubuntu, 5.0.375.99 beta). $.browser.safari = true, while $.browser.webkit = undefined</description>
		<content:encoded><![CDATA[<p>Weird, on Chrome (ubuntu, 5.0.375.99 beta). $.browser.safari = true, while $.browser.webkit = undefined</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tonci Damjanic</title>
		<link>http://api.jquery.com/jQuery.browser/comment-page-1/#comment-3995</link>
		<dc:creator>Tonci Damjanic</dc:creator>
		<pubDate>Tue, 06 Jul 2010 10:06:31 +0000</pubDate>
		<guid isPermaLink="false">http://api.jquery.com/?p=425#comment-3995</guid>
		<description>You should use the parseFloat() function, as $.browser.version contains a String instance actually.&lt;br&gt;&lt;br&gt;if($.browser.msie &amp;&amp; parseFloat($.browser.version) &lt; 7){&lt;br&gt;  //do other stuff&lt;br&gt;  return;&lt;br&gt;}</description>
		<content:encoded><![CDATA[<p>You should use the parseFloat() function, as $.browser.version contains a String instance actually.</p>
<p>if($.browser.msie &#038;&#038; parseFloat($.browser.version) &lt; 7){<br />  //do other stuff<br />  return;<br />}</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: edeiller</title>
		<link>http://api.jquery.com/jQuery.browser/comment-page-1/#comment-11671</link>
		<dc:creator>edeiller</dc:creator>
		<pubDate>Wed, 16 Jun 2010 15:09:00 +0000</pubDate>
		<guid isPermaLink="false">http://api.jquery.com/?p=425#comment-11671</guid>
		<description>function detectBrowserVersion(){
	var userAgent = navigator.userAgent.toLowerCase();
	$.browser.chrome = /chrome/.test(navigator.userAgent.toLowerCase());
	var version = 0;
	
	// Is this a version of IE?
	if($.browser.msie){
		userAgent = $.browser.version;
		userAgent = userAgent.substring(0,userAgent.indexOf(&#039;.&#039;));			
		version = userAgent;
	}

	// Is this a version of Chrome?
	if($.browser.chrome){
		userAgent = userAgent.substring(userAgent.indexOf(&#039;chrome/&#039;) +7);
		userAgent = userAgent.substring(0,userAgent.indexOf(&#039;.&#039;));			
		version = userAgent;
		// If it is chrome then jQuery thinks it&#039;s safari so we have to tell it it isn&#039;t
		$.browser.safari = false;
	}

	// Is this a version of Safari?
	if($.browser.safari){
		userAgent = userAgent.substring(userAgent.indexOf(&#039;safari/&#039;) +7);			
		userAgent = userAgent.substring(0,userAgent.indexOf(&#039;.&#039;));
		version = userAgent;			
	}

	// Is this a version of Mozilla?
	if($.browser.mozilla){
		//Is it Firefox?
		if(navigator.userAgent.toLowerCase().indexOf(&#039;firefox&#039;) != -1){
			userAgent = userAgent.substring(userAgent.indexOf(&#039;firefox/&#039;) +8);
			userAgent = userAgent.substring(0,userAgent.indexOf(&#039;.&#039;));
			version = userAgent;
		}
		// If not then it must be another Mozilla
		else{
		}
	}

	// Is this a version of Opera?
	if($.browser.opera){
		userAgent = userAgent.substring(userAgent.indexOf(&#039;version/&#039;) +8);
		userAgent = userAgent.substring(0,userAgent.indexOf(&#039;.&#039;));
		version = userAgent;
	}
	return version;
}</description>
		<content:encoded><![CDATA[<p>function detectBrowserVersion(){<br />
	var userAgent = navigator.userAgent.toLowerCase();<br />
	$.browser.chrome = /chrome/.test(navigator.userAgent.toLowerCase());<br />
	var version = 0;</p>
<p>	// Is this a version of IE?<br />
	if($.browser.msie){<br />
		userAgent = $.browser.version;<br />
		userAgent = userAgent.substring(0,userAgent.indexOf(&#8216;.&#8217;));<br />
		version = userAgent;<br />
	}</p>
<p>	// Is this a version of Chrome?<br />
	if($.browser.chrome){<br />
		userAgent = userAgent.substring(userAgent.indexOf(&#8216;chrome/&#8217;) +7);<br />
		userAgent = userAgent.substring(0,userAgent.indexOf(&#8216;.&#8217;));<br />
		version = userAgent;<br />
		// If it is chrome then jQuery thinks it&#8217;s safari so we have to tell it it isn&#8217;t<br />
		$.browser.safari = false;<br />
	}</p>
<p>	// Is this a version of Safari?<br />
	if($.browser.safari){<br />
		userAgent = userAgent.substring(userAgent.indexOf(&#8216;safari/&#8217;) +7);<br />
		userAgent = userAgent.substring(0,userAgent.indexOf(&#8216;.&#8217;));<br />
		version = userAgent;<br />
	}</p>
<p>	// Is this a version of Mozilla?<br />
	if($.browser.mozilla){<br />
		//Is it Firefox?<br />
		if(navigator.userAgent.toLowerCase().indexOf(&#8216;firefox&#8217;) != -1){<br />
			userAgent = userAgent.substring(userAgent.indexOf(&#8216;firefox/&#8217;) +8);<br />
			userAgent = userAgent.substring(0,userAgent.indexOf(&#8216;.&#8217;));<br />
			version = userAgent;<br />
		}<br />
		// If not then it must be another Mozilla<br />
		else{<br />
		}<br />
	}</p>
<p>	// Is this a version of Opera?<br />
	if($.browser.opera){<br />
		userAgent = userAgent.substring(userAgent.indexOf(&#8216;version/&#8217;) +8);<br />
		userAgent = userAgent.substring(0,userAgent.indexOf(&#8216;.&#8217;));<br />
		version = userAgent;<br />
	}<br />
	return version;<br />
}</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: nan</title>
		<link>http://api.jquery.com/jQuery.browser/comment-page-1/#comment-11518</link>
		<dc:creator>nan</dc:creator>
		<pubDate>Wed, 02 Jun 2010 23:08:00 +0000</pubDate>
		<guid isPermaLink="false">http://api.jquery.com/?p=425#comment-11518</guid>
		<description>if you simply want to get the browser name, you can use this:

var browser = jQuery.uaMatch(navigator.userAgent).browser;
</description>
		<content:encoded><![CDATA[<p>if you simply want to get the browser name, you can use this:</p>
<p>var browser = jQuery.uaMatch(navigator.userAgent).browser;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: k6</title>
		<link>http://api.jquery.com/jQuery.browser/comment-page-1/#comment-11512</link>
		<dc:creator>k6</dc:creator>
		<pubDate>Wed, 02 Jun 2010 08:04:00 +0000</pubDate>
		<guid isPermaLink="false">http://api.jquery.com/?p=425#comment-11512</guid>
		<description>if ( $.browser.webkit &amp;&amp; !$.browser.opera &amp;&amp; !$.browser.msie &amp;&amp; !$.browser.mozilla  ) {
  var userAgent = navigator.userAgent.toLowerCase();
  if ( userAgent.indexOf(&quot;chrome&quot;) === -1 ) { 
    alert(&quot;safari&quot;);
  }
}

I needed that because it seems on windows chrome has fixed the &lt;button bug where you had to use css hack for safari and chrome:

@media screen and (-webkit-min-device-pixel-ratio:0) {
	.buttons .button01 { position: relative; }
	.buttons .button01 span { margin: -1px -3px 0 0; min-width: 130px; }
}

Now, because chrome is ok by default, it brakes chrome. So sadly, I&#039;m going to use safari detection to add class=&quot;safari&quot; to body tag...</description>
		<content:encoded><![CDATA[<p>if ( $.browser.webkit &amp;&amp; !$.browser.opera &amp;&amp; !$.browser.msie &amp;&amp; !$.browser.mozilla  ) {<br />
  var userAgent = navigator.userAgent.toLowerCase();<br />
  if ( userAgent.indexOf(&#8220;chrome&#8221;) === -1 ) {<br />
    alert(&#8220;safari&#8221;);<br />
  }<br />
}</p>
<p>I needed that because it seems on windows chrome has fixed the &lt;button bug where you had to use css hack for safari and chrome:</p>
<p>@media screen and (-webkit-min-device-pixel-ratio:0) {<br />
	.buttons .button01 { position: relative; }<br />
	.buttons .button01 span { margin: -1px -3px 0 0; min-width: 130px; }<br />
}</p>
<p>Now, because chrome is ok by default, it brakes chrome. So sadly, I&#039;m going to use safari detection to add class=&quot;safari&quot; to body tag&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sergey Shcherbakov</title>
		<link>http://api.jquery.com/jQuery.browser/comment-page-1/#comment-11266</link>
		<dc:creator>Sergey Shcherbakov</dc:creator>
		<pubDate>Sat, 15 May 2010 19:29:00 +0000</pubDate>
		<guid isPermaLink="false">http://api.jquery.com/?p=425#comment-11266</guid>
		<description>chrome = navigator.userAgent.toLowerCase().indexOf(&#039;chrome&#039;) &gt; -1;</description>
		<content:encoded><![CDATA[<p>chrome = navigator.userAgent.toLowerCase().indexOf(&#8216;chrome&#8217;) &gt; -1;</p>
]]></content:encoded>
	</item>
</channel>
</rss>

