<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="ru">
		<id>http://wbex.ru/index.php?action=history&amp;feed=atom&amp;title=JavaScript_DHTML%2FjQuery%2FEvent</id>
		<title>JavaScript DHTML/jQuery/Event - История изменений</title>
		<link rel="self" type="application/atom+xml" href="http://wbex.ru/index.php?action=history&amp;feed=atom&amp;title=JavaScript_DHTML%2FjQuery%2FEvent"/>
		<link rel="alternate" type="text/html" href="http://wbex.ru/index.php?title=JavaScript_DHTML/jQuery/Event&amp;action=history"/>
		<updated>2026-04-04T11:33:05Z</updated>
		<subtitle>История изменений этой страницы в вики</subtitle>
		<generator>MediaWiki 1.30.0</generator>

	<entry>
		<id>http://wbex.ru/index.php?title=JavaScript_DHTML/jQuery/Event&amp;diff=3028&amp;oldid=prev</id>
		<title> в 10:02, 26 мая 2010</title>
		<link rel="alternate" type="text/html" href="http://wbex.ru/index.php?title=JavaScript_DHTML/jQuery/Event&amp;diff=3028&amp;oldid=prev"/>
				<updated>2010-05-26T10:02:45Z</updated>
		
		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;tr style=&quot;vertical-align: top;&quot; lang=&quot;ru&quot;&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;← Предыдущая&lt;/td&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;Версия 10:02, 26 мая 2010&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; style=&quot;text-align: center;&quot; lang=&quot;ru&quot;&gt;&lt;div class=&quot;mw-diff-empty&quot;&gt;(нет различий)&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</summary>
			</entry>

	<entry>
		<id>http://wbex.ru/index.php?title=JavaScript_DHTML/jQuery/Event&amp;diff=3029&amp;oldid=prev</id>
		<title>Admin: 1 версия</title>
		<link rel="alternate" type="text/html" href="http://wbex.ru/index.php?title=JavaScript_DHTML/jQuery/Event&amp;diff=3029&amp;oldid=prev"/>
				<updated>2010-05-26T07:24:09Z</updated>
		
		<summary type="html">&lt;p&gt;1 версия&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Новая страница&lt;/b&gt;&lt;/p&gt;&lt;div&gt;==Cancel a default action and prevent it from bubbling up==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
  &amp;lt;!-- start source code --&amp;gt;&lt;br /&gt;
   &lt;br /&gt;
    &amp;lt;source lang=&amp;quot;html4strict&amp;quot;&amp;gt;&lt;br /&gt;
    &lt;br /&gt;
&amp;lt;html&amp;gt;&lt;br /&gt;
  &amp;lt;head&amp;gt;&lt;br /&gt;
    &amp;lt;script type=&amp;quot;text/javascript&amp;quot; src=&amp;quot;js/jquery-1.3.2.js&amp;quot;&amp;gt;&amp;lt;/script&amp;gt;&lt;br /&gt;
    &amp;lt;script type=&amp;quot;text/javascript&amp;quot;&amp;gt;&lt;br /&gt;
    &lt;br /&gt;
        $(document).ready(function(){&lt;br /&gt;
              $(&amp;quot;div&amp;quot;).live(&amp;quot;click&amp;quot;, function() { return false; })&lt;br /&gt;
&lt;br /&gt;
        });&lt;br /&gt;
    &amp;lt;/script&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;/head&amp;gt;&lt;br /&gt;
  &amp;lt;body&amp;gt;&lt;br /&gt;
    &amp;lt;body&amp;gt;&lt;br /&gt;
       &amp;lt;div&amp;gt;&amp;lt;h1&amp;gt;header 1&amp;lt;/h1&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
    &amp;lt;/body&amp;gt;&lt;br /&gt;
&amp;lt;/html&amp;gt;&lt;br /&gt;
   &lt;br /&gt;
    &lt;br /&gt;
    &lt;br /&gt;
    &lt;br /&gt;
  &amp;lt;/source&amp;gt;&lt;br /&gt;
    &lt;br /&gt;
   &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Cancel only the default action by using the preventDefault method==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
  &amp;lt;!-- start source code --&amp;gt;&lt;br /&gt;
   &lt;br /&gt;
    &amp;lt;source lang=&amp;quot;html4strict&amp;quot;&amp;gt;&lt;br /&gt;
   &lt;br /&gt;
&amp;lt;html&amp;gt;&lt;br /&gt;
  &amp;lt;head&amp;gt;&lt;br /&gt;
    &amp;lt;script type=&amp;quot;text/javascript&amp;quot; src=&amp;quot;js/jquery-1.3.2.js&amp;quot;&amp;gt;&amp;lt;/script&amp;gt;&lt;br /&gt;
    &amp;lt;script type=&amp;quot;text/javascript&amp;quot;&amp;gt;&lt;br /&gt;
    &lt;br /&gt;
        $(document).ready(function(){&lt;br /&gt;
              $(&amp;quot;adiv&amp;quot;).live(&amp;quot;click&amp;quot;, function(event){&lt;br /&gt;
                   event.preventDefault();&lt;br /&gt;
               });&lt;br /&gt;
&lt;br /&gt;
        });&lt;br /&gt;
    &amp;lt;/script&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;/head&amp;gt;&lt;br /&gt;
  &amp;lt;body&amp;gt;&lt;br /&gt;
    &amp;lt;body&amp;gt;&lt;br /&gt;
       &amp;lt;div&amp;gt;&amp;lt;h1&amp;gt;header 1&amp;lt;/h1&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
    &amp;lt;/body&amp;gt;&lt;br /&gt;
&amp;lt;/html&amp;gt;&lt;br /&gt;
   &lt;br /&gt;
    &lt;br /&gt;
    &lt;br /&gt;
  &amp;lt;/source&amp;gt;&lt;br /&gt;
    &lt;br /&gt;
   &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Define custom event==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
  &amp;lt;!-- start source code --&amp;gt;&lt;br /&gt;
   &lt;br /&gt;
    &amp;lt;source lang=&amp;quot;html4strict&amp;quot;&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;html&amp;gt;&lt;br /&gt;
  &amp;lt;head&amp;gt;&lt;br /&gt;
    &amp;lt;script type=&amp;quot;text/javascript&amp;quot; src=&amp;quot;js/jquery-1.3.2.js&amp;quot;&amp;gt;&amp;lt;/script&amp;gt;&lt;br /&gt;
    &amp;lt;script type=&amp;quot;text/javascript&amp;quot;&amp;gt;&lt;br /&gt;
        $(document).ready(function(){&lt;br /&gt;
        &lt;br /&gt;
            &lt;br /&gt;
                $(&amp;quot;div&amp;quot;).bind(&amp;quot;myCustomEvent&amp;quot;, function(e, myName, myValue){&lt;br /&gt;
                  $(this).text(myName + &amp;quot;, hi there!&amp;quot;);&lt;br /&gt;
                });&lt;br /&gt;
                $(&amp;quot;button&amp;quot;).click(function () {&lt;br /&gt;
                  $(&amp;quot;div&amp;quot;).trigger(&amp;quot;myCustomEvent&amp;quot;, [ &amp;quot;asdf&amp;quot; ]);&lt;br /&gt;
                });&lt;br /&gt;
            &lt;br /&gt;
               &lt;br /&gt;
&lt;br /&gt;
        });&lt;br /&gt;
    &amp;lt;/script&amp;gt;&lt;br /&gt;
&amp;lt;style&amp;gt;&lt;br /&gt;
  div { width:50px; height:70px; float:left; margin:5px;&lt;br /&gt;
        background:rgb(255,140,0); cursor:pointer; }&lt;br /&gt;
  &lt;br /&gt;
&amp;lt;/style&amp;gt;&lt;br /&gt;
  &amp;lt;/head&amp;gt;&lt;br /&gt;
  &amp;lt;body&amp;gt;&lt;br /&gt;
    &amp;lt;body&amp;gt;&lt;br /&gt;
          &amp;lt;div&amp;gt;asdf&amp;lt;/div&amp;gt;&lt;br /&gt;
          &amp;lt;button&amp;gt;bn&amp;lt;/button&amp;gt;&lt;br /&gt;
                 &lt;br /&gt;
    &amp;lt;/body&amp;gt;&lt;br /&gt;
&amp;lt;/html&amp;gt;&lt;br /&gt;
   &lt;br /&gt;
  &amp;lt;/source&amp;gt;&lt;br /&gt;
    &lt;br /&gt;
   &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Dynamically tracking the dimensions of an element==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
  &amp;lt;!-- start source code --&amp;gt;&lt;br /&gt;
   &lt;br /&gt;
    &amp;lt;source lang=&amp;quot;html4strict&amp;quot;&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;html&amp;gt;&lt;br /&gt;
  &amp;lt;head&amp;gt;&lt;br /&gt;
    &amp;lt;script type=&amp;quot;text/javascript&amp;quot; src=&amp;quot;js/jquery-1.3.2.js&amp;quot;&amp;gt;&amp;lt;/script&amp;gt;&lt;br /&gt;
    &amp;lt;script type=&amp;quot;text/javascript&amp;quot;&amp;gt;&lt;br /&gt;
        $(document).ready(function(){&lt;br /&gt;
            $(function(){&lt;br /&gt;
                report();&lt;br /&gt;
            });&lt;br /&gt;
            function report() {&lt;br /&gt;
                $(&amp;quot;#display&amp;quot;).html(&lt;br /&gt;
                $(&amp;quot;#testSubject&amp;quot;).width()+&amp;quot;x&amp;quot;+$(&amp;quot;#testSubject&amp;quot;).height()&lt;br /&gt;
            );&lt;br /&gt;
            }&lt;br /&gt;
        });&lt;br /&gt;
    &amp;lt;/script&amp;gt;&lt;br /&gt;
&amp;lt;style&amp;gt;&lt;br /&gt;
  div { margin:3px; width:50px; position:absolute;&lt;br /&gt;
        height:50px; left:10px; top:30px; &lt;br /&gt;
        background-color:yellow; }&lt;br /&gt;
  div.red { background-color:red; }&lt;br /&gt;
  &lt;br /&gt;
&amp;lt;/style&amp;gt;&lt;br /&gt;
  &amp;lt;/head&amp;gt;&lt;br /&gt;
  &amp;lt;body&amp;gt;&lt;br /&gt;
    &amp;lt;body&amp;gt;&lt;br /&gt;
&amp;lt;div id=&amp;quot;testSubject&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div id=&amp;quot;display&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
    &amp;lt;/body&amp;gt;&lt;br /&gt;
&amp;lt;/html&amp;gt;&lt;br /&gt;
   &lt;br /&gt;
  &amp;lt;/source&amp;gt;&lt;br /&gt;
    &lt;br /&gt;
   &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Establishing event handlers with the DOM Level 2 Model==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
  &amp;lt;!-- start source code --&amp;gt;&lt;br /&gt;
   &lt;br /&gt;
    &amp;lt;source lang=&amp;quot;html4strict&amp;quot;&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;html&amp;gt;&lt;br /&gt;
  &amp;lt;head&amp;gt;&lt;br /&gt;
    &amp;lt;script type=&amp;quot;text/javascript&amp;quot; src=&amp;quot;js/jquery-1.3.2.js&amp;quot;&amp;gt;&amp;lt;/script&amp;gt;&lt;br /&gt;
    &amp;lt;script type=&amp;quot;text/javascript&amp;quot;&amp;gt;&lt;br /&gt;
        $(document).ready(function(){&lt;br /&gt;
$(function(){&lt;br /&gt;
    var element = $(&amp;quot;#my&amp;quot;)[0];&lt;br /&gt;
    element.addEventListener(&amp;quot;click&amp;quot;,function(event) {&lt;br /&gt;
        say(&amp;quot;once!&amp;quot;);&lt;br /&gt;
    },false);&lt;br /&gt;
    element.addEventListener(&amp;quot;click&amp;quot;,function(event) {&lt;br /&gt;
        say(&amp;quot;twice!&amp;quot;);&lt;br /&gt;
    },false);&lt;br /&gt;
    element.addEventListener(&amp;quot;click&amp;quot;,function(event) {&lt;br /&gt;
        say(&amp;quot;three times!&amp;quot;);&lt;br /&gt;
    },false);&lt;br /&gt;
});&lt;br /&gt;
function say(text) {&lt;br /&gt;
$(&amp;quot;#console&amp;quot;).append(&amp;quot;&amp;lt;div&amp;gt;&amp;quot;+text+&amp;quot;&amp;lt;/div&amp;gt;&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
        });&lt;br /&gt;
    &amp;lt;/script&amp;gt;&lt;br /&gt;
&amp;lt;style&amp;gt;&lt;br /&gt;
  div { margin:3px; width:50px; position:absolute;&lt;br /&gt;
        height:50px; left:10px; top:30px; &lt;br /&gt;
        background-color:yellow; }&lt;br /&gt;
  div.red { background-color:red; }&lt;br /&gt;
  &lt;br /&gt;
&amp;lt;/style&amp;gt;&lt;br /&gt;
  &amp;lt;/head&amp;gt;&lt;br /&gt;
  &amp;lt;body&amp;gt;&lt;br /&gt;
    &amp;lt;body&amp;gt;&lt;br /&gt;
      &amp;lt;img id=&amp;quot;my&amp;quot; src=&amp;quot;my.jpg&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;div id=&amp;quot;console&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
    &amp;lt;/body&amp;gt;&lt;br /&gt;
&amp;lt;/html&amp;gt;&lt;br /&gt;
   &lt;br /&gt;
  &amp;lt;/source&amp;gt;&lt;br /&gt;
    &lt;br /&gt;
   &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Event instance properties==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
  &amp;lt;!-- start source code --&amp;gt;&lt;br /&gt;
   &lt;br /&gt;
    &amp;lt;source lang=&amp;quot;html4strict&amp;quot;&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
Property                Description&lt;br /&gt;
altKey                  true if the Alt key was pressed.&lt;br /&gt;
ctrlKey                 true if the Ctrl key was pressed.&lt;br /&gt;
data                    passed as the second parameter to the bind() command.&lt;br /&gt;
keyCode                 For keyup and keydown events, returns the pressed key.&lt;br /&gt;
metaKey                 true if the Meta key was pressed.&lt;br /&gt;
pageX                   For mouse events, horizontal coordinate.&lt;br /&gt;
pageY                   For mouse events, vertical coordinate.&lt;br /&gt;
relatedTarget           For some mouse events, cursor left or entered when the event was triggered.&lt;br /&gt;
screenX                 For mouse events, horizontal coordinate.&lt;br /&gt;
screenY                 For mouse events, coordinate from the screen origin.&lt;br /&gt;
shiftKey                Set to true if the Shift key was pressed.&lt;br /&gt;
   &lt;br /&gt;
  &amp;lt;/source&amp;gt;&lt;br /&gt;
    &lt;br /&gt;
   &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Get click event coordinates==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
  &amp;lt;!-- start source code --&amp;gt;&lt;br /&gt;
   &lt;br /&gt;
    &amp;lt;source lang=&amp;quot;html4strict&amp;quot;&amp;gt;&lt;br /&gt;
    &lt;br /&gt;
&amp;lt;html&amp;gt;&lt;br /&gt;
  &amp;lt;head&amp;gt;&lt;br /&gt;
    &amp;lt;script type=&amp;quot;text/javascript&amp;quot; src=&amp;quot;js/jquery-1.3.2.js&amp;quot;&amp;gt;&amp;lt;/script&amp;gt;&lt;br /&gt;
    &amp;lt;script type=&amp;quot;text/javascript&amp;quot;&amp;gt;&lt;br /&gt;
        $(document).ready(function(){&lt;br /&gt;
             $(&amp;quot;h1&amp;quot;).bind(&amp;quot;click&amp;quot;, function(e){&lt;br /&gt;
                 var str = &amp;quot;( &amp;quot; + e.pageX + &amp;quot;, &amp;quot; + e.pageY + &amp;quot; )&amp;quot;;&lt;br /&gt;
                 $(&amp;quot;h1&amp;quot;).text(&amp;quot;Click happened! &amp;quot; + str);&lt;br /&gt;
             });&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
        });&lt;br /&gt;
    &amp;lt;/script&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;/head&amp;gt;&lt;br /&gt;
  &amp;lt;body&amp;gt;&lt;br /&gt;
    &amp;lt;body&amp;gt;&lt;br /&gt;
       &amp;lt;div&amp;gt;&amp;lt;h1&amp;gt;header 1&amp;lt;/h1&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
    &amp;lt;/body&amp;gt;&lt;br /&gt;
&amp;lt;/html&amp;gt;&lt;br /&gt;
   &lt;br /&gt;
    &lt;br /&gt;
    &lt;br /&gt;
    &lt;br /&gt;
  &amp;lt;/source&amp;gt;&lt;br /&gt;
    &lt;br /&gt;
   &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Get event target==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
  &amp;lt;!-- start source code --&amp;gt;&lt;br /&gt;
   &lt;br /&gt;
    &amp;lt;source lang=&amp;quot;html4strict&amp;quot;&amp;gt;&lt;br /&gt;
    &lt;br /&gt;
&amp;lt;html&amp;gt;&lt;br /&gt;
  &amp;lt;head&amp;gt;&lt;br /&gt;
    &amp;lt;script type=&amp;quot;text/javascript&amp;quot; src=&amp;quot;js/jquery-1.3.2.js&amp;quot;&amp;gt;&amp;lt;/script&amp;gt;&lt;br /&gt;
    &amp;lt;script type=&amp;quot;text/javascript&amp;quot;&amp;gt;&lt;br /&gt;
        $(document).ready(function(){&lt;br /&gt;
           $(&amp;quot;#container&amp;quot;).click(function (e) {&lt;br /&gt;
              &lt;br /&gt;
              alert(e.target.tagName);&lt;br /&gt;
              e.preventDefault();&lt;br /&gt;
              return false;&lt;br /&gt;
            });&lt;br /&gt;
        });&lt;br /&gt;
    &amp;lt;/script&amp;gt;&lt;br /&gt;
  &amp;lt;/head&amp;gt;&lt;br /&gt;
  &amp;lt;body&amp;gt;&lt;br /&gt;
    &amp;lt;body&amp;gt;&lt;br /&gt;
    &amp;lt;div id=&amp;quot;container&amp;quot;&amp;gt;&lt;br /&gt;
        &amp;lt;div&amp;gt;&lt;br /&gt;
          &amp;lt;p&amp;gt;This &amp;lt;span&amp;gt;is the &amp;lt;em&amp;gt;way&amp;lt;/em&amp;gt; we&amp;lt;/span&amp;gt; &lt;br /&gt;
          write &amp;lt;em&amp;gt;the&amp;lt;/em&amp;gt; demo,&amp;lt;/p&amp;gt;&lt;br /&gt;
        &amp;lt;/div&amp;gt;&lt;br /&gt;
    &amp;lt;/div&amp;gt;&lt;br /&gt;
  &amp;lt;/body&amp;gt;&lt;br /&gt;
&amp;lt;/html&amp;gt;&lt;br /&gt;
   &lt;br /&gt;
    &lt;br /&gt;
    &lt;br /&gt;
    &lt;br /&gt;
  &amp;lt;/source&amp;gt;&lt;br /&gt;
    &lt;br /&gt;
   &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Get tag name from event target==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
  &amp;lt;!-- start source code --&amp;gt;&lt;br /&gt;
   &lt;br /&gt;
    &amp;lt;source lang=&amp;quot;html4strict&amp;quot;&amp;gt;&lt;br /&gt;
    &lt;br /&gt;
&amp;lt;html&amp;gt;&lt;br /&gt;
  &amp;lt;head&amp;gt;&lt;br /&gt;
    &amp;lt;script type=&amp;quot;text/javascript&amp;quot; src=&amp;quot;js/jquery-1.3.2.js&amp;quot;&amp;gt;&amp;lt;/script&amp;gt;&lt;br /&gt;
    &amp;lt;script type=&amp;quot;text/javascript&amp;quot;&amp;gt;&lt;br /&gt;
        $(document).ready(function(){&lt;br /&gt;
           $(&amp;quot;#container&amp;quot;).click(function (e) {&lt;br /&gt;
              &lt;br /&gt;
              alert(e.target.tagName);&lt;br /&gt;
              e.preventDefault();&lt;br /&gt;
              return false;&lt;br /&gt;
            });&lt;br /&gt;
        });&lt;br /&gt;
    &amp;lt;/script&amp;gt;&lt;br /&gt;
  &amp;lt;/head&amp;gt;&lt;br /&gt;
  &amp;lt;body&amp;gt;&lt;br /&gt;
    &amp;lt;body&amp;gt;&lt;br /&gt;
    &amp;lt;div id=&amp;quot;container&amp;quot;&amp;gt;&lt;br /&gt;
        &amp;lt;div&amp;gt;&lt;br /&gt;
          &amp;lt;p&amp;gt;This &amp;lt;span&amp;gt;is the &amp;lt;em&amp;gt;way&amp;lt;/em&amp;gt; we&amp;lt;/span&amp;gt; &lt;br /&gt;
          write &amp;lt;em&amp;gt;the&amp;lt;/em&amp;gt; demo,&amp;lt;/p&amp;gt;&lt;br /&gt;
        &amp;lt;/div&amp;gt;&lt;br /&gt;
    &amp;lt;/div&amp;gt;&lt;br /&gt;
  &amp;lt;/body&amp;gt;&lt;br /&gt;
&amp;lt;/html&amp;gt;&lt;br /&gt;
   &lt;br /&gt;
    &lt;br /&gt;
    &lt;br /&gt;
    &lt;br /&gt;
  &amp;lt;/source&amp;gt;&lt;br /&gt;
    &lt;br /&gt;
   &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Pass some extra data before the event handler:==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
  &amp;lt;!-- start source code --&amp;gt;&lt;br /&gt;
   &lt;br /&gt;
    &amp;lt;source lang=&amp;quot;html4strict&amp;quot;&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
function handler(event) {&lt;br /&gt;
  alert(event.data.foo);&lt;br /&gt;
}&lt;br /&gt;
$(&amp;quot;p&amp;quot;).bind(&amp;quot;click&amp;quot;, {foo: &amp;quot;bar&amp;quot;}, handler)&lt;br /&gt;
   &lt;br /&gt;
  &amp;lt;/source&amp;gt;&lt;br /&gt;
    &lt;br /&gt;
   &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Prevent default event==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
  &amp;lt;!-- start source code --&amp;gt;&lt;br /&gt;
   &lt;br /&gt;
    &amp;lt;source lang=&amp;quot;html4strict&amp;quot;&amp;gt;&lt;br /&gt;
    &lt;br /&gt;
&amp;lt;html&amp;gt;&lt;br /&gt;
  &amp;lt;head&amp;gt;&lt;br /&gt;
    &amp;lt;script type=&amp;quot;text/javascript&amp;quot; src=&amp;quot;js/jquery-1.3.2.js&amp;quot;&amp;gt;&amp;lt;/script&amp;gt;&lt;br /&gt;
    &amp;lt;script type=&amp;quot;text/javascript&amp;quot;&amp;gt;&lt;br /&gt;
 $(document).ready(function(){&lt;br /&gt;
   $(&amp;quot;a&amp;quot;).click(function(event){&lt;br /&gt;
     alert(&amp;quot;the link no longer works&amp;quot;);&lt;br /&gt;
     event.preventDefault();&lt;br /&gt;
   });&lt;br /&gt;
 });&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;/script&amp;gt;&lt;br /&gt;
  &amp;lt;/head&amp;gt;&lt;br /&gt;
  &amp;lt;body&amp;gt;&lt;br /&gt;
    &amp;lt;a href=&amp;quot;http://wbex.ru/&amp;quot;&amp;gt;wbex.ru&amp;lt;/a&amp;gt;&lt;br /&gt;
  &amp;lt;/body&amp;gt;&lt;br /&gt;
&amp;lt;/html&amp;gt;&lt;br /&gt;
   &lt;br /&gt;
    &lt;br /&gt;
    &lt;br /&gt;
    &lt;br /&gt;
  &amp;lt;/source&amp;gt;&lt;br /&gt;
    &lt;br /&gt;
   &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Removes a bound live event==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
  &amp;lt;!-- start source code --&amp;gt;&lt;br /&gt;
   &lt;br /&gt;
    &amp;lt;source lang=&amp;quot;html4strict&amp;quot;&amp;gt;&lt;br /&gt;
    &lt;br /&gt;
&amp;lt;html&amp;gt;&lt;br /&gt;
  &amp;lt;head&amp;gt;&lt;br /&gt;
    &amp;lt;script type=&amp;quot;text/javascript&amp;quot; src=&amp;quot;js/jquery-1.3.2.js&amp;quot;&amp;gt;&amp;lt;/script&amp;gt;&lt;br /&gt;
    &amp;lt;script type=&amp;quot;text/javascript&amp;quot;&amp;gt;&lt;br /&gt;
    &lt;br /&gt;
        $(document).ready(function(){&lt;br /&gt;
              $(&amp;quot;div&amp;quot;).die(&amp;quot;click&amp;quot;, function(event){&lt;br /&gt;
                   event.preventDefault();&lt;br /&gt;
              });&lt;br /&gt;
&lt;br /&gt;
        });&lt;br /&gt;
    &amp;lt;/script&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;/head&amp;gt;&lt;br /&gt;
  &amp;lt;body&amp;gt;&lt;br /&gt;
    &amp;lt;body&amp;gt;&lt;br /&gt;
       &amp;lt;div&amp;gt;&amp;lt;h1&amp;gt;header 1&amp;lt;/h1&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
    &amp;lt;/body&amp;gt;&lt;br /&gt;
&amp;lt;/html&amp;gt;&lt;br /&gt;
   &lt;br /&gt;
    &lt;br /&gt;
    &lt;br /&gt;
    &lt;br /&gt;
  &amp;lt;/source&amp;gt;&lt;br /&gt;
    &lt;br /&gt;
   &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Stop only an event from bubbling by using the stopPropagation method.==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
  &amp;lt;!-- start source code --&amp;gt;&lt;br /&gt;
   &lt;br /&gt;
    &amp;lt;source lang=&amp;quot;html4strict&amp;quot;&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
$(&amp;quot;form&amp;quot;).bind(&amp;quot;submit&amp;quot;, function(event){&lt;br /&gt;
  event.stopPropagation();&lt;br /&gt;
});&lt;br /&gt;
   &lt;br /&gt;
  &amp;lt;/source&amp;gt;&lt;br /&gt;
    &lt;br /&gt;
   &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==To cancel only the default action by using the preventDefault method.==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
  &amp;lt;!-- start source code --&amp;gt;&lt;br /&gt;
   &lt;br /&gt;
    &amp;lt;source lang=&amp;quot;html4strict&amp;quot;&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
$(&amp;quot;form&amp;quot;).bind(&amp;quot;submit&amp;quot;, function(event){&lt;br /&gt;
  event.preventDefault();&lt;br /&gt;
});&lt;br /&gt;
   &lt;br /&gt;
  &amp;lt;/source&amp;gt;&lt;br /&gt;
    &lt;br /&gt;
   &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Tracking event propagation with bubble and capture handlers==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
  &amp;lt;!-- start source code --&amp;gt;&lt;br /&gt;
   &lt;br /&gt;
    &amp;lt;source lang=&amp;quot;html4strict&amp;quot;&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;html&amp;gt;&lt;br /&gt;
  &amp;lt;head&amp;gt;&lt;br /&gt;
    &amp;lt;script type=&amp;quot;text/javascript&amp;quot; src=&amp;quot;js/jquery-1.3.2.js&amp;quot;&amp;gt;&amp;lt;/script&amp;gt;&lt;br /&gt;
    &amp;lt;script type=&amp;quot;text/javascript&amp;quot;&amp;gt;&lt;br /&gt;
        $(document).ready(function(){&lt;br /&gt;
            $(function(){&lt;br /&gt;
                $(&amp;quot;*&amp;quot;).each(function(){&lt;br /&gt;
                    var current = this;&lt;br /&gt;
                    this.addEventListener(&amp;quot;click&amp;quot;,function(event) {&lt;br /&gt;
                      say(current.tagName + &amp;quot;#&amp;quot;+ current.id + &amp;quot; target is &amp;quot; + event.target.id);&lt;br /&gt;
                    },true);&lt;br /&gt;
                    this.addEventListener(&amp;quot;click&amp;quot;,function(event) {&lt;br /&gt;
                      say(current.tagName + &amp;quot;#&amp;quot;+ current.id + &amp;quot; target is &amp;quot; + event.target.id);&lt;br /&gt;
                    },false);&lt;br /&gt;
                });&lt;br /&gt;
            });&lt;br /&gt;
            function say(text) {&lt;br /&gt;
            $(&amp;quot;#console&amp;quot;).append(&amp;quot;&amp;lt;div&amp;gt;&amp;quot;+text+&amp;quot;&amp;lt;/div&amp;gt;&amp;quot;);&lt;br /&gt;
            }&lt;br /&gt;
        });&lt;br /&gt;
    &amp;lt;/script&amp;gt;&lt;br /&gt;
&amp;lt;style&amp;gt;&lt;br /&gt;
  div { margin:3px; width:50px; position:absolute;&lt;br /&gt;
        height:50px; left:10px; top:30px; &lt;br /&gt;
        background-color:yellow; }&lt;br /&gt;
  div.red { background-color:red; }&lt;br /&gt;
  &lt;br /&gt;
&amp;lt;/style&amp;gt;&lt;br /&gt;
  &amp;lt;/head&amp;gt;&lt;br /&gt;
  &amp;lt;body&amp;gt;&lt;br /&gt;
    &amp;lt;body&amp;gt;&lt;br /&gt;
        &amp;lt;div id=&amp;quot;a&amp;quot;&amp;gt;&lt;br /&gt;
        &amp;lt;div id=&amp;quot;b&amp;quot;&amp;gt;&lt;br /&gt;
        &amp;lt;img id=&amp;quot;c&amp;quot; src=&amp;quot;my.jpg&amp;quot;/&amp;gt;&lt;br /&gt;
        &amp;lt;/div&amp;gt;&lt;br /&gt;
        &amp;lt;/div&amp;gt;&lt;br /&gt;
        &amp;lt;div id=&amp;quot;console&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
    &amp;lt;/body&amp;gt;&lt;br /&gt;
&amp;lt;/html&amp;gt;&lt;br /&gt;
   &lt;br /&gt;
  &amp;lt;/source&amp;gt;&lt;/div&gt;</summary>
		<author><name>Admin</name></author>	</entry>

	</feed>