<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
  <channel>
    <title>Crisis Averted!: Tag: yui</title>
    <link>http://socket7.net</link>
    <description>Crisis Averted! A weblog by Brett Stimmerman.</description>
    <managingEditor>brettstimmerman@gmail.com (Brett Stimmerman)</managingEditor>
    <webMaster>brettstimmerman@gmail.com (Brett Stimmerman)</webMaster>
    <docs>http://backend.userland.com/rss</docs>
    <ttl>60</ttl>

  <item>
  <title>Outside Events for YUI 3</title>
  <link>http://socket7.net/article/outside-events-for-yui-3</link>
  <description>
    &lt;p&gt;&lt;a href=&quot;http://yuilibrary.com/gallery/show/outside-events&quot;&gt;Outside Events&lt;/a&gt; is a spankin' new YUI 3 Gallery module that allows elements to subscribe to DOM events that occur outside of them. An event occurs outside the subscriber if the target it is not the subscriber itself, or any of the subscriber's ancestors. Many common outside events are pre-defined and ready to use, and defining new outside events is a cinch.&lt;/p&gt;

&lt;p&gt;Outside Events is tiny weighing in at 475 bytes minified and gzipped. It's also hosted on the same CDN as YUI 3, so including it in your projects is simple and fast.&lt;/p&gt;

&lt;pre class=&quot;prettyprint&quot;&gt;
YUI({
    // Last Gallery Build of this module
    gallery: 'gallery-2010.04.21-21-51'
}).use('gallery-outside-events', function(Y) {
    // Outside events are ready to go!
});
&lt;/pre&gt;

&lt;p&gt;Subscribe to outside events just like any other DOM event. Here is the pre-defined &lt;code&gt;clickoutside&lt;/code&gt; event in action.&lt;/p&gt;

&lt;pre class=&quot;prettyprint&quot;&gt;
Y.one('#dialog').on('clickoutside', function (e) {
    this.addClass('hidden');
});
&lt;/pre&gt;

&lt;p&gt;Let's say you've defined a sweet new &lt;code&gt;swipe&lt;/code&gt; event with the YUI 3 &lt;a href=&quot;http://developer.yahoo.com/yui/3/event/#define&quot;&gt;Synthetic DOM Event API&lt;/a&gt;. Defining &lt;code&gt;swipeoutside&lt;/code&gt; is easy.&lt;/p&gt;

&lt;pre class=&quot;prettyprint&quot;&gt;
Y.Event.defineOutside('swipe');
&lt;/pre&gt;

&lt;p&gt;New outside events are named &lt;code&gt;&amp;lt;event&amp;gt;outside&lt;/code&gt; by default. You can optionally give new outside events a custom name.&lt;/p&gt;

&lt;pre class=&quot;prettyprint&quot;&gt;
Y.Event.defineOutside('swipe', 'outerswipe');
Y.one('#foo').on('outerswipe', ... );
&lt;/pre&gt;

&lt;p&gt;Outside event handlers receive the originating DOM event object as an argument.&lt;/p&gt;

&lt;pre class=&quot;prettyprint&quot;&gt;
Y.one('#foo').on('keyupoutside', function (e) {
    var tag  = e.target.get('tagName'),
        text = 'A keyup event occured on a ' + tag + ' element ' +
            'outside of #foo';
          
    alert(text);
});
&lt;/pre&gt;

&lt;p&gt;To learn more about Outside Events and view the list of pre-defined outside events, have a look at the &lt;a href=&quot;http://yuilibrary.com/gallery/show/outside-events&quot;&gt;YUI Library page&lt;/a&gt; and the &lt;a href=&quot;http://github.com/brettstimmerman/outside-events/blob/master/README.md&quot;&gt;README&lt;/a&gt;, which goes into detail about a few general caveats and specific known issues with IE 6, 7 and 8 you should be aware of.&lt;/p&gt;  </description>
      <category domain="http://socket7.net/tag/javascript">javascript</category>
      <category domain="http://socket7.net/tag/outside+events">outside events</category>
      <category domain="http://socket7.net/tag/programming">programming</category>
      <category domain="http://socket7.net/tag/software">software</category>
      <category domain="http://socket7.net/tag/yui">yui</category>
    <comments>http://socket7.net/article/outside-events-for-yui-3#comments</comments>
  <guid isPermaLink="true">http://socket7.net/article/outside-events-for-yui-3</guid>
  <pubDate>Wed, 21 Apr 2010 17:05:17 -0700</pubDate>
</item>
  <item>
  <title>Optimizing Yahoo! Search for the iPhone</title>
  <link>http://socket7.net/article/optimizing-yahoo-search-for-the-iphone</link>
  <description>
    My co-worker &lt;a href=&quot;http://wonko.com&quot;&gt;Ryan Grove&lt;/a&gt; has posted an article on the &lt;a href=&quot;http:/yuiblog.com&quot;&gt;YUI Blog&lt;/a&gt; describing several ways he &lt;a href=&quot;http://yuiblog.com/blog/2008/08/28/ysearch-for-iphone/&quot;&gt;optimized Yahoo! Search for the iPhone&lt;/a&gt;.  He covers things like Mobile Safari cache size limits and squeezing every last byte out of minified JavaScript.  Sage advice for budding and veteran iPhone web developers alike.  </description>
      <category domain="http://socket7.net/tag/iphone">iphone</category>
      <category domain="http://socket7.net/tag/javascript">javascript</category>
      <category domain="http://socket7.net/tag/mobile+safari">mobile safari</category>
      <category domain="http://socket7.net/tag/performance">performance</category>
      <category domain="http://socket7.net/tag/yahoo%21+search">yahoo! search</category>
      <category domain="http://socket7.net/tag/yui">yui</category>
    <comments>http://socket7.net/article/optimizing-yahoo-search-for-the-iphone#comments</comments>
  <guid isPermaLink="true">http://socket7.net/article/optimizing-yahoo-search-for-the-iphone</guid>
  <pubDate>Thu, 28 Aug 2008 15:52:29 -0700</pubDate>
</item>

  </channel>
</rss>
<!-- 0.0145 -->