aspx Tutorial

.NET Articles,jQuery demo, asp.net with jQuery, online tutorial,Jquery, SilverLight, Javascript, asp.net,JSON, MVC,.NET Articles,demo, Web Services, .NET articles, Sharepoint 2010, visual studio 2010,Aamir Hasan,IT
Advertise Here

Advertize

wwwSW
Posted by Aamir Hasan   on Tuesday, November 2, 2010 Total Views:  

This example shows, how to detect mouse x and y axis on the page and display mouse position on the screen using jQuery.

Here’s is a solution.

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">

<head runat="server">

<title>Detect mouse X and Y axis using jQuery</title>

<script src="http://code.jquery.com/jquery-1.4.3.min.js" type="text/javascript"></script>

<script language="javascript">

   $(document).ready(function () {

     $(this).mousemove(function (e) {

       $("#<%=Label1.ClientID %>").html("x-axis:" + e.pageX + " <br> y-axis:" + e.pageY);

            });

        });  

    </script>

</head>

<body>

    <form id="form1" runat="server">

    <div>

        <h2>Detect mouse X and Y axis using jQuery</h2>

        <asp:Label ID="Label1" runat="server"></asp:Label>

    </div>

    </form>

</body>

</html>

 

Download

DetectMousepostion.zip (908.00 bytes)

Live demo

Tags: ,
Category: All | asp.net | jQuery
Protected by Copyscape Online Plagiarism Tool

Comments (1) -

fafafa
fafafa Slovenia
4/23/2012 3:04:45 AM #

http://www.christianlouboutinukk.org   christian louboutin
http://www.tiffanyuks.org   tiffany uk
http://www.gucciukbeltuk.org   gucci belt
http://www.frsaclouisvuittonsac.com   louis vuitton sac
http://www.chanelukoutletuks.org   chanel outlet
http://www.burberryukoutletuk.org   burberry
http://www.poloralphlaurenuko.org   ralph lauren uk

Add comment

  Country flag

biuquote
  • Comment
  • Preview
Loading

Advertizement 1
Advertizement 2
Advertizement 3
Advertizement 4
Advertizement 5