<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Javascript on Ricky Moorhouse</title>
    <link>https://rickymoorhouse.uk/tags/javascript/</link>
    <description>Recent content in Javascript on Ricky Moorhouse</description>
    <generator>Hugo</generator>
    <language>en-gb</language>
    <lastBuildDate>Wed, 20 Oct 2010 12:19:35 +0000</lastBuildDate>
    <atom:link href="https://rickymoorhouse.uk/tags/javascript/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Recreating swipe to reveal in HTML, CSS and JS</title>
      <link>https://rickymoorhouse.uk/blog/2010/recreating-twitter-for-iphones-swipe-to-reveal/</link>
      <pubDate>Wed, 20 Oct 2010 12:19:35 +0000</pubDate>
      <guid>https://rickymoorhouse.uk/blog/2010/recreating-twitter-for-iphones-swipe-to-reveal/</guid>
      <description>&lt;p&gt;One of the things I really like about the interface in Tweetie / Twitter for iPhone is being able to swipe a tweet to reveal actions beneath it.  This is my attempt to recreate it using HTML, CSS3 and Javascript.  The main swiping action seems to work nicely, but to complete it, I&#39;d like to add a bit more bounciness, a sound effect on swipe (using ?) and have better handling of non-swipe actions.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Only load jQuery if not already present</title>
      <link>https://rickymoorhouse.uk/blog/2010/only-load-jquery-if-not-already-present/</link>
      <pubDate>Mon, 21 Jun 2010 14:01:59 +0000</pubDate>
      <guid>https://rickymoorhouse.uk/blog/2010/only-load-jquery-if-not-already-present/</guid>
      <description>&lt;p&gt;Very useful method of ensuring jQuery is loaded before running the code that needs it - from &lt;a href=&#34;http://alexmarandon.com/articles/web_widget_jquery/&#34;&gt;How to build a web widget (using jQuery) - Alex Marandon&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;[js]&#xA;/******** Load jQuery if not present *********/&#xA;if (typeof jQuery === &amp;quot;undefined&amp;quot; || jQuery.fn.jquery !== &#39;1.4.2&#39;) {&#xA;var script_tag = document.createElement(&#39;script&#39;);&#xA;script_tag.setAttribute(&amp;quot;type&amp;quot;,&amp;quot;text/javascript&amp;quot;);&#xA;script_tag.setAttribute(&amp;quot;src&amp;quot;,&#xA;&amp;quot;http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js&amp;quot;)&#xA;script_tag.onload = main; // Run main() once jQuery has loaded&#xA;script_tag.onreadystatechange = function () { // Same thing but for IE&#xA;if (this.readyState == &#39;complete&#39; || this.readyState == &#39;loaded&#39;) main();&#xA;}&#xA;document.getElementsByTagName(&amp;quot;head&amp;quot;)[0].appendChild(script_tag);&#xA;} else {&#xA;main();&#xA;}&#xA;[/js]&lt;/p&gt;</description>
    </item>
  </channel>
</rss>
