<?xml version="1.0" encoding="utf-8" ?>

<rss version="2.0" 
   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
   xmlns:admin="http://webns.net/mvcb/"
   xmlns:dc="http://purl.org/dc/elements/1.1/"
   xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
   xmlns:wfw="http://wellformedweb.org/CommentAPI/"
   xmlns:content="http://purl.org/rss/1.0/modules/content/"
   >
<channel>
    <title>Ken Snyder - JavaScript</title>
    <link>http://kendsnyder.com/</link>
    <description>PHP, JavaScript, CSS</description>
    <dc:language>en</dc:language>
    <generator>Serendipity 1.3.1 - http://www.s9y.org/</generator>
    <pubDate>Wed, 25 Jun 2008 14:20:05 GMT</pubDate>

    <image>
        <url>http://kendsnyder.com/templates/bulletproof/img/s9y_banner_small.png</url>
        <title>RSS: Ken Snyder - JavaScript - PHP, JavaScript, CSS</title>
        <link>http://kendsnyder.com/</link>
        <width>100</width>
        <height>21</height>
    </image>

<item>
    <title>Compiled JavaScript Templating</title>
    <link>http://kendsnyder.com/archives/13-Compiled-JavaScript-Templating.html</link>
            <category>JavaScript</category>
            <category>Prototype</category>
            <category>Web Development</category>
    
    <comments>http://kendsnyder.com/archives/13-Compiled-JavaScript-Templating.html#comments</comments>
    <wfw:comment>http://kendsnyder.com/wfwcomment.php?cid=13</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>http://kendsnyder.com/rss.php?version=2.0&amp;type=comments&amp;cid=13</wfw:commentRss>
    

    <author>nospam@example.com (Ken Snyder)</author>
    <content:encoded>
    &lt;p&gt;I&#039;ve got my old version of CompiledTemplate online in a &lt;a onclick=&quot;javascript: pageTracker._trackPageview(&#039;/extlink/pastie.org/221410&#039;);&quot;  href=&quot;http://pastie.org/221410&quot; target=&quot;_blank&quot;&gt;Pastie&lt;/a&gt;. It&#039;s got the source and a simple example. I need to finish my new version and do some benchmarking.&lt;/p&gt;&lt;p&gt;It actually isn&#039;t often useful since it is usually better to generate content on the server side.&lt;/p&gt; 
    </content:encoded>

    <pubDate>Wed, 25 Jun 2008 08:20:05 -0600</pubDate>
    <guid isPermaLink="false">http://kendsnyder.com/archives/13-guid.html</guid>
    
</item>
<item>
    <title>Easing Equations</title>
    <link>http://kendsnyder.com/archives/11-Easing-Equations.html</link>
            <category>JavaScript</category>
            <category>Prototype</category>
            <category>Web Development</category>
    
    <comments>http://kendsnyder.com/archives/11-Easing-Equations.html#comments</comments>
    <wfw:comment>http://kendsnyder.com/wfwcomment.php?cid=11</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>http://kendsnyder.com/rss.php?version=2.0&amp;type=comments&amp;cid=11</wfw:commentRss>
    

    <author>nospam@example.com (Ken Snyder)</author>
    <content:encoded>
    
&lt;p&gt;Robert Penner created a suite of mathematically genius actionscript functions to simulate real-life movements in Flash.  The results are compelling.&lt;/p&gt;

&lt;p&gt;A few years back, I ported Robert Penner&#039;s equations to JavaScript for use with Scriptaculous transitions. Here is &lt;a href=&quot;http://kendsnyder.com/sandbox/easing/&quot;&gt;a little playground&lt;/a&gt; I set up to test them out. They are available for download there as well. Here is &lt;a onclick=&quot;javascript: pageTracker._trackPageview(&#039;/extlink/robertpenner.com/easing/easing_demo.html&#039;);&quot;  target=&quot;_blank&quot; href=&quot;http://robertpenner.com/easing/easing_demo.html&quot;&gt;Rober Penner&#039;s original demo&lt;/a&gt; and &lt;a onclick=&quot;javascript: pageTracker._trackPageview(&#039;/extlink/robertpenner.com/index2.html&#039;);&quot;  target=&quot;_blank&quot; href=&quot;http://robertpenner.com/index2.html&quot;&gt;Easing Equations page&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;We see swinging, bouncing, and elastic movements in real life, and even a lot on Flash and even TV due to the work of Rober Penner.&lt;/p&gt;&lt;p&gt;Thomas Fuchs uses my custom bouncePast transition on &lt;a onclick=&quot;javascript: pageTracker._trackPageview(&#039;/extlink/script.aculo.us/thomas/&#039;);&quot;  href=&quot;http://script.aculo.us/thomas/&quot; target=&quot;_blank&quot;&gt;his site&lt;/a&gt;!&lt;/p&gt; 
    </content:encoded>

    <pubDate>Thu, 12 Jun 2008 21:41:01 -0600</pubDate>
    <guid isPermaLink="false">http://kendsnyder.com/archives/11-guid.html</guid>
    
</item>
<item>
    <title>Goodies</title>
    <link>http://kendsnyder.com/archives/9-Goodies.html</link>
            <category>JavaScript</category>
            <category>Web Development</category>
    
    <comments>http://kendsnyder.com/archives/9-Goodies.html#comments</comments>
    <wfw:comment>http://kendsnyder.com/wfwcomment.php?cid=9</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>http://kendsnyder.com/rss.php?version=2.0&amp;type=comments&amp;cid=9</wfw:commentRss>
    

    <author>nospam@example.com (Ken Snyder)</author>
    <content:encoded>
    &lt;p&gt;I ran into two great concepts today. First, there is a way to prevent circular references that choke IE&#039;s garbage collector. &lt;a onclick=&quot;javascript: pageTracker._trackPageview(&#039;/extlink/www.hedgerwow.com/360/dhtml/ie6_memory_leak_fix/&#039;);&quot;  href=&quot;http://www.hedgerwow.com/360/dhtml/ie6_memory_leak_fix/&quot; target=&quot;_blank&quot;&gt;(View Article)&lt;/a&gt; I&#039;ll need to check into the concept more to see where I can use it. Hopefully it can be used in an event listener system. Thanks Kip!&lt;/p&gt;

&lt;p&gt;Second, a great &lt;a onclick=&quot;javascript: pageTracker._trackPageview(&#039;/extlink/www.whatsmyip.org/mod_gzip_test/&#039;);&quot;  href=&quot;http://www.whatsmyip.org/mod_gzip_test/&quot; target=&quot;_blank&quot;&gt;tool for testing gzip&lt;/a&gt;. I&#039;d love to show it to folks at work to let them know how much bandwidth we can save if we use gzip.&lt;/p&gt; 
    </content:encoded>

    <pubDate>Mon, 09 Jun 2008 22:41:27 -0600</pubDate>
    <guid isPermaLink="false">http://kendsnyder.com/archives/9-guid.html</guid>
    
</item>
<item>
    <title>MouseEnter and MouseLeave</title>
    <link>http://kendsnyder.com/archives/6-MouseEnter-and-MouseLeave.html</link>
            <category>JavaScript</category>
            <category>Prototype</category>
            <category>Web Development</category>
    
    <comments>http://kendsnyder.com/archives/6-MouseEnter-and-MouseLeave.html#comments</comments>
    <wfw:comment>http://kendsnyder.com/wfwcomment.php?cid=6</wfw:comment>

    <slash:comments>1</slash:comments>
    <wfw:commentRss>http://kendsnyder.com/rss.php?version=2.0&amp;type=comments&amp;cid=6</wfw:commentRss>
    

    <author>nospam@example.com (Ken Snyder)</author>
    <content:encoded>
    &lt;p&gt;Mouseover and mouseout events are not intuitive. I&#039;ve made a &lt;a href=&quot;http://kendsnyder.com/sandbox/enterleave/&quot; target=&quot;_blank&quot; title=&quot;View Demo&quot;&gt;mockup and demo&lt;/a&gt; of a very short snippet that addresses the problem.&lt;/p&gt;

&lt;p&gt;
The problem is that mouseout events are fired when moving into a child element
and mouseover events are fired when moving from a child element.  
This behavior is confusing.
&lt;/p&gt;

&lt;p&gt;
On a mouseover, the relatedTarget property references the node from which the pointer came.  
On a mouseout, the relatedTarget property references the node to which the pointer went.
On any event, the scope is the node to which the event is attached.
When the relatedTarget is a not child of the currentTarget, a mouseover event is equivalent to a mouseenter event and a mouseout event is equivalent to a mouseleave event.
&lt;/p&gt;

&lt;p&gt;
&lt;strong&gt;Example Usage:&lt;/strong&gt;&lt;br /&gt;
&lt;div class=&quot;javascript&quot; style=&quot;text-align: left&quot;&gt;&lt;br /&gt;$&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #3366CC;&quot;&gt;&#039;nav&#039;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt;.&lt;span style=&quot;color: #006600;&quot;&gt;observe&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #3366CC;&quot;&gt;&#039;mouseover&#039;&lt;/span&gt;, myMouseEnterCallback.&lt;span style=&quot;color: #006600;&quot;&gt;bindAsMouseEnter&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#40;&lt;/span&gt;scope, arg1, arg2&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt;;&lt;br /&gt;&amp;#160;&lt;/div&gt;
&lt;/p&gt; 
    </content:encoded>

    <pubDate>Wed, 04 Jun 2008 20:15:07 -0600</pubDate>
    <guid isPermaLink="false">http://kendsnyder.com/archives/6-guid.html</guid>
    
</item>
<item>
    <title>DOM Mutation Events</title>
    <link>http://kendsnyder.com/archives/1-DOM-Mutation-Events.html</link>
            <category>JavaScript</category>
            <category>Prototype</category>
            <category>Web Development</category>
    
    <comments>http://kendsnyder.com/archives/1-DOM-Mutation-Events.html#comments</comments>
    <wfw:comment>http://kendsnyder.com/wfwcomment.php?cid=1</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>http://kendsnyder.com/rss.php?version=2.0&amp;type=comments&amp;cid=1</wfw:commentRss>
    

    <author>nospam@example.com (Ken Snyder)</author>
    <content:encoded>
    
&lt;p&gt;I&#039;m experimenting with adding &lt;a onclick=&quot;javascript: pageTracker._trackPageview(&#039;/extlink/www.w3.org/TR/DOM-Level-2-Events/events.html#Events-eventgroupings-mutationevents&#039;);&quot;  title=&quot;W3C Specification for Mutation Events&quot; href=&quot;http://www.w3.org/TR/DOM-Level-2-Events/events.html#Events-eventgroupings-mutationevents&quot;&gt;DOM Mutation Events&lt;/a&gt; to Prototype.  It is probably too much of an edge case for Prototype Core (and maybe just academic in general) so it&#039;s in plugin form.
&lt;/p&gt;
&lt;p&gt;
The two main events are DOMSubtreeModified (dom:subtreemodified) and DOMAttrModified (dom:attrmodified).  The DOMSubtreeModified event is meant to fire anytime attribute or content is modified or a node is inserted or removed.  It is a generic event that is fired along side all the other Mutation Events.  The DOMAttrModified event fires any time an attribute is added, removed, or modified.  In Prototype that happens in Element#writeAttribute, Element#update, Element#addClassName, and Element#removeClassName.
&lt;/p&gt;
&lt;p&gt;
The other two events I&#039;ve addressed are DOMNodeInserted and DOMNodeRemoved.  Those are pretty self explanatory.
&lt;/p&gt;
&lt;p&gt;
I&#039;ve pasted my first draft online. &lt;a onclick=&quot;javascript: pageTracker._trackPageview(&#039;/extlink/pastie.caboo.se/206618&#039;);&quot;  target=&quot;_blank&quot; href=&quot;http://pastie.caboo.se/206618&quot;&gt;(view)&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
I&#039;ve also come up with some related methods.  Element.onLoad polls the DOM until an element with the given id is found or until the entire DOM is loaded.  Element.onCreate hooks into the Element constructor and fires registered callbacks anytime an element is created.  Element.onExists registers a callback with Element.onLoad and Element.onCreate to fire when an element with the given id is loaded or created.
&lt;/p&gt;
&lt;p&gt;
That first draft is also online.  &lt;a onclick=&quot;javascript: pageTracker._trackPageview(&#039;/extlink/pastie.caboo.se/206621&#039;);&quot;  target=&quot;_blank&quot; href=&quot;http://pastie.caboo.se/206621&quot;&gt;(view)&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
Off the top of my head, here is one possible use: A script wants to be aware of attempts by other scripts and plugins to replace content at or below a certain node.
&lt;/p&gt;
&lt;div class=&quot;javascript&quot; style=&quot;text-align: left&quot;&gt;&lt;br /&gt;$&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #3366CC;&quot;&gt;&#039;message&#039;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt;.&lt;span style=&quot;color: #006600;&quot;&gt;observe&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #3366CC;&quot;&gt;&#039;dom:subtreemodified&#039;&lt;/span&gt;, &lt;span style=&quot;color: #003366; font-weight: bold;&quot;&gt;function&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#40;&lt;/span&gt;event&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#123;&lt;/span&gt;&lt;br /&gt;&amp;#160; event.&lt;span style=&quot;color: #006600;&quot;&gt;element&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt;.&lt;span style=&quot;color: #006600;&quot;&gt;addClassName&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #3366CC;&quot;&gt;&#039;warning&#039;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt;;&lt;br /&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#125;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt;;&lt;br /&gt;&amp;#160;&lt;/div&gt; 
    </content:encoded>

    <pubDate>Sat, 31 May 2008 18:47:51 -0600</pubDate>
    <guid isPermaLink="false">http://kendsnyder.com/archives/1-guid.html</guid>
    
</item>

</channel>
</rss>