Show texts when mouseup and mousedown event triggering. : Event Mouse « jQuery « JavaScript Tutorial

Home
JavaScript Tutorial
1.Language Basics
2.Operators
3.Statement
4.Development
5.Number Data Type
6.String
7.Function
8.Global
9.Math
10.Form
11.Array
12.Date
13.Dialogs
14.Document
15.Event
16.Location
17.Navigator
18.Screen
19.Window
20.History
21.HTML Tags
22.Style
23.DOM Node
24.Drag Drop
25.Object Oriented
26.Regular Expressions
27.XML
28.GUI Components
29.Dojo toolkit
30.jQuery
31.Animation
32.MS JScript
JavaScript Tutorial » jQuery » Event Mouse 
30.130.16.Show texts when mouseup and mousedown event triggering.
<html>
  <head>
    <script type="text/javascript" src="js/jquery-1.3.2.js"></script>
    <script type="text/javascript">
        $(document).ready(function(){
            $("p").mouseup(function(){
              $(this).append('<span style="color:#F00;">Mouse up.</span>');
            }).mousedown(function(){
              $(this).append('<span style="color:#00F;">Mouse down.</span>');
            });



        });
    </script>
<style>

  div.dbl background:yellow;color:black; }
  
</style>
  </head>
  <body>
    <body>
         <p>Press mouse and release here.</p>
    </body>
</html>
30.130.Event Mouse
30.130.1.Mouse enter event
30.130.2.Mouse leave event
30.130.3.Mouse down event
30.130.4.Mouse enter
30.130.5.Cascaded Mouse leave event
30.130.6.Mouse out event
30.130.7.Mouse over event
30.130.8.Mouse over action
30.130.9.Mouse up event
30.130.10.mouseover event triggering
30.130.11.mouseenter event triggering
30.130.12.mouseleave event triggering
30.130.13.mouseout(fn) event fires when mouse is moved away from an element.
30.130.14.mousemove(fn) event fires when mouse is moved
30.130.15.mousedown(fn) event fires when the pointing device button is pressed over an element.
30.130.16.Show texts when mouseup and mousedown event triggering.
30.130.17.Show the mouse coordinates when the mouse is moved over the yellow div. Coordinates are relative to the window which in this case is the iframe.
java2s.com  | Contact Us | Privacy Policy
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.