<?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>simra &#187; jQuery</title>
	<atom:link href="http://www.simra.ch/category/javascript/jquery/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.simra.ch</link>
	<description>development &#38; design</description>
	<lastBuildDate>Fri, 26 Mar 2010 15:57:34 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>How to get the position of an element in jQuery</title>
		<link>http://www.simra.ch/2010/01/how-to-get-the-position-of-an-element-in-jquery/</link>
		<comments>http://www.simra.ch/2010/01/how-to-get-the-position-of-an-element-in-jquery/#comments</comments>
		<pubDate>Tue, 05 Jan 2010 15:47:47 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[jQuery]]></category>
		<category><![CDATA[Element]]></category>
		<category><![CDATA[position]]></category>

		<guid isPermaLink="false">http://www.simra.ch/?p=1042</guid>
		<description><![CDATA[Here&#8217;s a little example of how to retrieve the current position of any element:

var pos = $&#40;&#34;#mydiv&#34;&#41;.show&#40;&#41;.position&#40;&#41;; //the element has to be visible -&#62; show
alert&#40;pos.left + &#34; &#34; + pos.top&#41;;
]]></description>
			<content:encoded><![CDATA[<p>Here&#8217;s a little example of how to retrieve the current position of any element:<br />
<span id="more-1042"></span></p>
<div class="codecolorer-container javascript default" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="javascript codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #003366; font-weight: bold;">var</span> pos <span style="color: #339933;">=</span> $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;#mydiv&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">show</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">position</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #006600; font-style: italic;">//the element has to be visible -&gt; show</span><br />
<span style="color: #000066;">alert</span><span style="color: #009900;">&#40;</span>pos.<span style="color: #660066;">left</span> <span style="color: #339933;">+</span> <span style="color: #3366CC;">&quot; &quot;</span> <span style="color: #339933;">+</span> pos.<span style="color: #660066;">top</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></div></div>
]]></content:encoded>
			<wfw:commentRss>http://www.simra.ch/2010/01/how-to-get-the-position-of-an-element-in-jquery/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>jQuery hasClass</title>
		<link>http://www.simra.ch/2009/12/jquery-hasclass/</link>
		<comments>http://www.simra.ch/2009/12/jquery-hasclass/#comments</comments>
		<pubDate>Sun, 13 Dec 2009 15:35:59 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[jQuery]]></category>
		<category><![CDATA[hasClass]]></category>

		<guid isPermaLink="false">http://www.simra.ch/?p=979</guid>
		<description><![CDATA[jQuery has the hasClass() function that returns true if any element in the wrapped set contains the specified class.

if &#40;!&#40;$&#40;this&#41;.hasClass&#40;&#34;classname&#34;&#41;&#41;
]]></description>
			<content:encoded><![CDATA[<p>jQuery has the hasClass() function that returns true if any element in the wrapped set contains the specified class.<br />
<span id="more-979"></span></p>
<div class="codecolorer-container javascript default" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="javascript codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #339933;">!</span><span style="color: #009900;">&#40;</span>$<span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">this</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">hasClass</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;classname&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span></div></div>
]]></content:encoded>
			<wfw:commentRss>http://www.simra.ch/2009/12/jquery-hasclass/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Ajax Request for RSS Feeds with jQuery</title>
		<link>http://www.simra.ch/2009/11/ajax-request-for-rss-feeds-with-jquery/</link>
		<comments>http://www.simra.ch/2009/11/ajax-request-for-rss-feeds-with-jquery/#comments</comments>
		<pubDate>Sat, 28 Nov 2009 14:21:55 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[jQuery]]></category>
		<category><![CDATA[Ajax]]></category>
		<category><![CDATA[Request]]></category>
		<category><![CDATA[RSS]]></category>

		<guid isPermaLink="false">http://www.simra.ch/?p=803</guid>
		<description><![CDATA[In this example I will show you how to easily load RSS Feeds into your web site by using Ajax. Of course you can load Rss Feeds directly in your Php script, but an Ajax request won&#8217;t slow down the loading process. However for security reasons, Ajax cannot make remote/external calls to XML. Therefore you [...]]]></description>
			<content:encoded><![CDATA[<p>In this example I will show you how to easily load RSS Feeds into your web site by using Ajax. Of course you can load Rss Feeds directly in your Php script, but an Ajax request won&#8217;t slow down the loading process. However for security reasons, Ajax cannot make remote/external calls to XML. Therefore you have to create a bridge in Php, that accesses the Feeds and returns the XML locally. Anyways here&#8217;s how to get your Twitter feeds- but of course you can apply this code to any other XML file.<br />
<span id="more-803"></span><br />
Here&#8217;s the <strong>bridge.php</strong> file:</p>
<div class="codecolorer-container php default" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="php codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #000000; font-weight: bold;">&lt;?php</span><br />
<a href="http://www.php.net/header"><span style="color: #990000;">header</span></a><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;Content-Type: application/xml; charset=UTF-8&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<span style="color: #000088;">$feed</span> <span style="color: #339933;">=</span> <span style="color: #009900;">&#40;</span><a href="http://www.php.net/isset"><span style="color: #990000;">isset</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$_REQUEST</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'feed'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> ? <span style="color: #000088;">$_REQUEST</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'feed'</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">:</span> <span style="color: #0000ff;">''</span><span style="color: #339933;">;</span><br />
<span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #339933;">!</span><a href="http://www.php.net/empty"><span style="color: #990000;">empty</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$feed</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">||</span> <a href="http://www.php.net/is_string"><span style="color: #990000;">is_string</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$feed</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #b1b100;">echo</span> <a href="http://www.php.net/file_get_contents"><span style="color: #990000;">file_get_contents</span></a><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;http://&quot;</span><span style="color: #339933;">.</span><span style="color: #000088;">$feed</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<span style="color: #000000; font-weight: bold;">?&gt;</span></div></div>
<p>Ajax Request:</p>
<div class="codecolorer-container javascript default" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="javascript codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">jQuery<span style="color: #009900;">&#40;</span>document<span style="color: #009900;">&#41;</span>.<span style="color: #660066;">ready</span><span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span> &nbsp;<br />
&nbsp; &nbsp; jQuery<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;#loading&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">show</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> &nbsp;<br />
&nbsp; &nbsp; jQuery.<span style="color: #660066;">ajax</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#123;</span> &nbsp;<br />
&nbsp; &nbsp; &nbsp; &nbsp; type<span style="color: #339933;">:</span> <span style="color: #3366CC;">&quot;GET&quot;</span><span style="color: #339933;">,</span> &nbsp;<br />
&nbsp; &nbsp; &nbsp; &nbsp; url<span style="color: #339933;">:</span> <span style="color: #3366CC;">&quot;bridge.php?feed=&quot;</span><span style="color: #339933;">+</span>escape<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;twitter.com/statuses/user_timeline/55789790.rss&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span> &nbsp;<br />
&nbsp; &nbsp; &nbsp; &nbsp; dataType<span style="color: #339933;">:</span> <span style="color: #3366CC;">&quot;xml&quot;</span><span style="color: #339933;">,</span> &nbsp;<br />
&nbsp; &nbsp; &nbsp; &nbsp; success<span style="color: #339933;">:</span> parseXml &nbsp;<br />
&nbsp; &nbsp; <span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> &nbsp;<br />
&nbsp; &nbsp; <span style="color: #003366; font-weight: bold;">function</span> parseXml<span style="color: #009900;">&#40;</span>xml<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span> <br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #003366; font-weight: bold;">var</span> items <span style="color: #339933;">=</span> xml.<span style="color: #660066;">getElementsByTagName</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'item'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;lasttweet&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">set</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;html&quot;</span><span style="color: #339933;">,</span>items<span style="color: #009900;">&#91;</span><span style="color: #CC0000;">0</span><span style="color: #009900;">&#93;</span>.<span style="color: #660066;">getElementsByTagName</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'description'</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#91;</span>0<span style="color: #009900;">&#93;</span>.<span style="color: #660066;">firstChild</span>.<span style="color: #660066;">nodeValue</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <span style="color: #009900;">&#125;</span> &nbsp;<br />
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></div></div>
]]></content:encoded>
			<wfw:commentRss>http://www.simra.ch/2009/11/ajax-request-for-rss-feeds-with-jquery/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
