<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>plugin &#8211; stoimen&#039;s web log</title>
	<atom:link href="/tag/plugin/feed/" rel="self" type="application/rss+xml" />
	<link></link>
	<description>on web development</description>
	<lastBuildDate>Tue, 13 Feb 2018 08:18:15 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>https://wordpress.org/?v=5.0.3</generator>
	<item>
		<title>jQuery browser and OS detection plugin</title>
		<link>/2009/07/16/jquery-browser-and-os-detection-plugin/</link>
		<comments>/2009/07/16/jquery-browser-and-os-detection-plugin/#comments</comments>
		<pubDate>Thu, 16 Jul 2009 13:50:42 +0000</pubDate>
		<dc:creator><![CDATA[Stoimen]]></dc:creator>
				<category><![CDATA[javascript]]></category>
		<category><![CDATA[browser]]></category>
		<category><![CDATA[detection]]></category>
		<category><![CDATA[jquery]]></category>
		<category><![CDATA[os]]></category>
		<category><![CDATA[plugin]]></category>
		<category><![CDATA[quirksmode]]></category>

		<guid isPermaLink="false">/?p=689</guid>
		<description><![CDATA[Browser/OS detection with jQuery As I wrote in my recent post I simply use the PPK BrowserDetect object to find out the browser/OS of the client. Actually I&#8217;m pretty sure there&#8217;s a similar jQuery plugin based again on that code from Quirksmode.org, but however I decided to write a simple plugin for jQuery wrapping it &#8230; <a href="/2009/07/16/jquery-browser-and-os-detection-plugin/" class="more-link">Continue reading <span class="screen-reader-text">jQuery browser and OS detection plugin</span> <span class="meta-nav">&#8594;</span></a><div class='yarpp-related-rss'>

Related posts:<ol>
<li><a href="/2009/07/27/jquery-debug-plugin/" rel="bookmark" title="jQuery debug plugin">jQuery debug plugin </a></li>
<li><a href="/2010/02/01/writing-a-jquery-plugin-part-2-sample-plugin/" rel="bookmark" title="Writing a jQuery plugin &#8211; (part 2). Sample plugin.">Writing a jQuery plugin &#8211; (part 2). Sample plugin. </a></li>
<li><a href="/2010/02/16/jquery-tooltip-plugin/" rel="bookmark" title="jQuery tooltip plugin!">jQuery tooltip plugin! </a></li>
<li><a href="/2010/02/17/clickoutside-jquery-plugin/" rel="bookmark" title="clickoutside jQuery plugin">clickoutside jQuery plugin </a></li>
</ol>
</div>
]]></description>
				<content:encoded><![CDATA[<h2>Browser/OS detection with jQuery</h2>
<p>As I wrote in my recent <a title="jQuery OS detection" href="/2009/07/04/jquery-os-detection/" target="_self">post</a> I simply use the <a title="PPK BrowserDetect object" href="http://www.quirksmode.org/js/detect.html" target="_blank">PPK BrowserDetect object</a> to find out the browser/OS of the client. Actually I&#8217;m pretty sure there&#8217;s a similar jQuery plugin based again on that code from <a title="Quirks Mode" href="http://www.quirksmode.org/" target="_blank">Quirksmode.org</a>, but however I decided to write a simple plugin for jQuery wrapping it into a closure and exporting it in the &#8220;$&#8221; object.</p>
<p><a href="/wp-content/uploads/2009/07/jquery-client-detect-source.png"><img class="alignnone size-full wp-image-692" title="jquery-client-detect-source" src="/wp-content/uploads/2009/07/jquery-client-detect-source.png" alt="" width="430" height="257" srcset="/wp-content/uploads/2009/07/jquery-client-detect-source.png 430w, /wp-content/uploads/2009/07/jquery-client-detect-source-300x179.png 300w" sizes="(max-width: 430px) 100vw, 430px" /></a></p>
<h2>Demo</h2>
<p>You can see full working example <a title="jquery client detect" href="http://stoimen.com/jquery.client.plugin/" target="_blank">here</a>.</p>
<p><a href="/wp-content/uploads/2009/07/jquery-client-detect.png"><img class="alignnone size-full wp-image-690" title="jquery-client-detect" src="/wp-content/uploads/2009/07/jquery-client-detect.png" alt="" width="430" height="150" srcset="/wp-content/uploads/2009/07/jquery-client-detect.png 430w, /wp-content/uploads/2009/07/jquery-client-detect-300x104.png 300w" sizes="(max-width: 430px) 100vw, 430px" /></a></p>
<h2>Installation</h2>
<p>You must add a link to <a title="jquery client detect js" href="http://stoimen.com/jquery.client.plugin/jquery.client.js.zip" target="_blank">jquery.client.js</a> after the jquery.js file in your code:</p>
<pre lang="html4strict" escaped="true">&lt;html&gt;
&lt;body&gt;
 &lt;div id="os"&gt;&lt;/div&gt;
 &lt;div id="browser"&gt;&lt;/div&gt;
 &lt;script src="./jquery-1.3.2.js"&gt;&lt;/script&gt;
 &lt;script src="./jquery.client.js"&gt;&lt;/script&gt;
 &lt;script&gt;
  $('#os').html("&lt;b&gt;" + $.client.os + "&lt;/b&gt;");
  $('#browser').html("&lt;b&gt;" + $.client.browser + "&lt;/b&gt;");
 &lt;/script&gt;
&lt;/body&gt;
&lt;/html&gt;</pre>
<p>Now there&#8217;s a $.client object containing two strings with OS and browser, they can be referenced with:</p>
<pre lang="javascript">$.client.browser
$.client.os</pre>
<p>You can append this code after you jquery.js installation. And if you&#8217;re on Firefox you simply can test with the <strong>console</strong> object:</p>
<p><a href="/wp-content/uploads/2009/07/jquery-client-detect-firebug-console.png"><img class="alignnone size-full wp-image-691" title="jquery-client-detect-firebug-console" src="/wp-content/uploads/2009/07/jquery-client-detect-firebug-console.png" alt="" width="430" height="114" srcset="/wp-content/uploads/2009/07/jquery-client-detect-firebug-console.png 430w, /wp-content/uploads/2009/07/jquery-client-detect-firebug-console-300x79.png 300w" sizes="(max-width: 430px) 100vw, 430px" /></a></p>
<h2>Download</h2>
<p>You can download the sample code from <a title="jquery client plugin download" href="http://stoimen.com/jquery.client.plugin/jquery.client.js.zip">here</a>.</p>
<div class='yarpp-related-rss'>
<p>Related posts:<ol>
<li><a href="/2009/07/27/jquery-debug-plugin/" rel="bookmark" title="jQuery debug plugin">jQuery debug plugin </a></li>
<li><a href="/2010/02/01/writing-a-jquery-plugin-part-2-sample-plugin/" rel="bookmark" title="Writing a jQuery plugin &#8211; (part 2). Sample plugin.">Writing a jQuery plugin &#8211; (part 2). Sample plugin. </a></li>
<li><a href="/2010/02/16/jquery-tooltip-plugin/" rel="bookmark" title="jQuery tooltip plugin!">jQuery tooltip plugin! </a></li>
<li><a href="/2010/02/17/clickoutside-jquery-plugin/" rel="bookmark" title="clickoutside jQuery plugin">clickoutside jQuery plugin </a></li>
</ol></p>
</div>
]]></content:encoded>
			<wfw:commentRss>/2009/07/16/jquery-browser-and-os-detection-plugin/feed/</wfw:commentRss>
		<slash:comments>40</slash:comments>
		</item>
	</channel>
</rss>
