<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/'><id>tag:blogger.com,1999:blog-20880701.post884813182570310374..comments</id><updated>2011-05-24T14:28:00.578+02:00</updated><category term='templates'/><category term='print'/><category term='css framework'/><category term='framework'/><category term='css'/><category term='emastic beta2'/><category term='hartija'/><category term='free'/><category term='formy'/><title type='text'>Comments on Carrer Blog: Event Delegation - JavaScript</title><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://www.vcarrer.com/feeds/884813182570310374/comments/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/20880701/884813182570310374/comments/default'/><link rel='alternate' type='text/html' href='http://www.vcarrer.com/2011/05/event-delegation-javascript.html'/><author><name>Vladimir</name><uri>http://www.blogger.com/profile/04801854386297420021</uri><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>6</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-20880701.post-5859129171623608167</id><published>2011-05-24T14:28:00.578+02:00</published><updated>2011-05-24T14:28:00.578+02:00</updated><title type='text'>@Anonymous: Thanks for the tip. 

I wanted to say ...</title><content type='html'>@Anonymous: Thanks for the tip. &lt;br /&gt;&lt;br /&gt;I wanted to say building, making, construct. I thought that building a project = projecting. I will update the post.</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/20880701/884813182570310374/comments/default/5859129171623608167'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/20880701/884813182570310374/comments/default/5859129171623608167'/><link rel='alternate' type='text/html' href='http://www.vcarrer.com/2011/05/event-delegation-javascript.html?showComment=1306240080578#c5859129171623608167' title=''/><author><name>Vladimir</name><uri>http://www.blogger.com/profile/04801854386297420021</uri><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://www.vcarrer.com/2011/05/event-delegation-javascript.html' ref='tag:blogger.com,1999:blog-20880701.post-884813182570310374' source='http://www.blogger.com/feeds/20880701/posts/default/884813182570310374' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-721468892'/></entry><entry><id>tag:blogger.com,1999:blog-20880701.post-3920597107847654924</id><published>2011-05-24T13:36:49.807+02:00</published><updated>2011-05-24T13:36:49.807+02:00</updated><title type='text'>&amp;quot;projecting&amp;quot; means to stick out, suspect...</title><content type='html'>&amp;quot;projecting&amp;quot; means to stick out, suspect you mean project managing so why not say that!</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/20880701/884813182570310374/comments/default/3920597107847654924'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/20880701/884813182570310374/comments/default/3920597107847654924'/><link rel='alternate' type='text/html' href='http://www.vcarrer.com/2011/05/event-delegation-javascript.html?showComment=1306237009807#c3920597107847654924' title=''/><author><name>Anonymous</name><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img1.blogblog.com/img/blank.gif'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://www.vcarrer.com/2011/05/event-delegation-javascript.html' ref='tag:blogger.com,1999:blog-20880701.post-884813182570310374' source='http://www.blogger.com/feeds/20880701/posts/default/884813182570310374' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-954331231'/></entry><entry><id>tag:blogger.com,1999:blog-20880701.post-628889118484795231</id><published>2011-05-24T01:25:00.350+02:00</published><updated>2011-05-24T01:25:00.350+02:00</updated><title type='text'>@Billangelo: Thanks for the comment.

I thought to...</title><content type='html'>@Billangelo: Thanks for the comment.&lt;br /&gt;&lt;br /&gt;I thought to implement in the future multiple event.type like jQuery does, something like:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;if (e.type == &amp;#39;mouseover&amp;#39;) {&lt;br /&gt;..do something&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;if (e.type == &amp;#39;click&amp;#39;) {&lt;br /&gt;..do something&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;or use switch/case logic</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/20880701/884813182570310374/comments/default/628889118484795231'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/20880701/884813182570310374/comments/default/628889118484795231'/><link rel='alternate' type='text/html' href='http://www.vcarrer.com/2011/05/event-delegation-javascript.html?showComment=1306193100350#c628889118484795231' title=''/><author><name>Vladimir</name><uri>http://www.blogger.com/profile/04801854386297420021</uri><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://www.vcarrer.com/2011/05/event-delegation-javascript.html' ref='tag:blogger.com,1999:blog-20880701.post-884813182570310374' source='http://www.blogger.com/feeds/20880701/posts/default/884813182570310374' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-721468892'/></entry><entry><id>tag:blogger.com,1999:blog-20880701.post-8888717276101491838</id><published>2011-05-23T22:59:27.216+02:00</published><updated>2011-05-23T22:59:27.216+02:00</updated><title type='text'>You could do that, or make it very simple using jq...</title><content type='html'>You could do that, or make it very simple using jquery and fire a function rather then events if you need it quick and simple:&lt;br /&gt;&lt;br /&gt;$(&amp;#39;a&amp;#39;).click(function(){&lt;br /&gt;  switch($(this).attr(&amp;#39;id&amp;#39;)) {&lt;br /&gt;    case &amp;#39;draggable&amp;#39;:&lt;br /&gt;      // dispatch dragging event&lt;br /&gt;      dispatchEvent(initTouchEvent(bla, bla, bla));&lt;br /&gt;      break;&lt;br /&gt;  }&lt;br /&gt;});&lt;br /&gt;&lt;br /&gt;Then add universal event listener(s) once so any object that dispatch&amp;#39;s an event will have a universal event listener rather then an event listener for every object, switch it through a function to specifically target what you want to do with the type of event dispatched, and voila less complicated, organized, leaner, faster running code.&lt;br /&gt;&lt;br /&gt;document.addEventListener(&amp;#39;touchStart&amp;#39;, touchEventHandler, false);&lt;br /&gt;document.addEventListener(&amp;#39;touchEnd&amp;#39;, touchEventHandler, false);&lt;br /&gt;&lt;br /&gt;function touchEventHandler(event) {&lt;br /&gt;  switch (event.type) {&lt;br /&gt;    case &amp;#39;touchStart&amp;#39;:&lt;br /&gt;      // do something based on the current object dispatching the event&lt;br /&gt;      break;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;Technically you don&amp;#39;t need to dispatch an event (first example of jquery), since every time you touch/gesture the screen you are dispatching an event and just need to grab specific data of what you&amp;#39;re touching in order to do something. Which you pass it through your fuction handler that determines what you did, and fires functions/code to do what you want with what you touched.</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/20880701/884813182570310374/comments/default/8888717276101491838'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/20880701/884813182570310374/comments/default/8888717276101491838'/><link rel='alternate' type='text/html' href='http://www.vcarrer.com/2011/05/event-delegation-javascript.html?showComment=1306184367216#c8888717276101491838' title=''/><author><name>Billangelo</name><uri>http://www.blogger.com/profile/09178210604472954544</uri><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://www.vcarrer.com/2011/05/event-delegation-javascript.html' ref='tag:blogger.com,1999:blog-20880701.post-884813182570310374' source='http://www.blogger.com/feeds/20880701/posts/default/884813182570310374' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-1264990185'/></entry><entry><id>tag:blogger.com,1999:blog-20880701.post-1918159502761720234</id><published>2011-05-23T13:09:13.986+02:00</published><updated>2011-05-23T13:09:13.986+02:00</updated><title type='text'>@raptor: 
Thanks! Nice suggestion!
 I actually was...</title><content type='html'>@raptor: &lt;br /&gt;Thanks! Nice suggestion!&lt;br /&gt; I actually wasn&amp;#39;t familiar with mozMatchesSelector and webkitMatchesSelector and it definitely can be useful for selector matching.</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/20880701/884813182570310374/comments/default/1918159502761720234'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/20880701/884813182570310374/comments/default/1918159502761720234'/><link rel='alternate' type='text/html' href='http://www.vcarrer.com/2011/05/event-delegation-javascript.html?showComment=1306148953986#c1918159502761720234' title=''/><author><name>Vladimir</name><uri>http://www.blogger.com/profile/04801854386297420021</uri><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://www.vcarrer.com/2011/05/event-delegation-javascript.html' ref='tag:blogger.com,1999:blog-20880701.post-884813182570310374' source='http://www.blogger.com/feeds/20880701/posts/default/884813182570310374' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-721468892'/></entry><entry><id>tag:blogger.com,1999:blog-20880701.post-4751662553152573056</id><published>2011-05-23T03:41:37.877+02:00</published><updated>2011-05-23T03:41:37.877+02:00</updated><title type='text'>If it&amp;#39;s only supposed to work in WebKit, you d...</title><content type='html'>If it&amp;#39;s only supposed to work in WebKit, you don&amp;#39;t even need to select elements to compare against in the delegate handler. You can just use the webkitMatchesSelector() method on the target element instead.</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/20880701/884813182570310374/comments/default/4751662553152573056'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/20880701/884813182570310374/comments/default/4751662553152573056'/><link rel='alternate' type='text/html' href='http://www.vcarrer.com/2011/05/event-delegation-javascript.html?showComment=1306114897877#c4751662553152573056' title=''/><author><name>raptor</name><uri>http://www.blogger.com/profile/03986002993920154462</uri><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://www.vcarrer.com/2011/05/event-delegation-javascript.html' ref='tag:blogger.com,1999:blog-20880701.post-884813182570310374' source='http://www.blogger.com/feeds/20880701/posts/default/884813182570310374' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-325473493'/></entry></feed>
