Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
J
jquery
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
夏彬
jquery
Commits
028f9d85
Commit
028f9d85
authored
Jan 09, 2007
by
Jörn Zaefferer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Moved event object docs to wiki
parent
41cc839a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
97 deletions
+0
-97
event.js
src/event/event.js
+0
-97
No files found.
src/event/event.js
View file @
028f9d85
/**
* Describes the nature of the event.
*
* Native by all browsers.
*
* @example $("a").click(function(event) {
* alert(event.type);
* });
* @result "click"
*
* @property
* @name event.type
* @type String
* @cat Events
*/
/**
* Contains the DOM element that issued the event. This can be
* the element that registered for the event or a child of it.
*
* Fixed where necessary (IE, Safari).
*
* Use to implement event delegation.
*
* @example $("a[@href=http://google.com]").click(function(event) {
* alert(event.target.href);
* });
* @result "http://google.com"
* @desc Alerts the href property of the target element.
*
* @example function handler(event) {
* var target = $(event.target);
* if( target.is("li") ) {
* target.children().toggle();
* }
* }
* $("ul").click(handler).find("li > ").hide();
* @desc Implements a simple event delegation: The click handler is added
* to an unordered list, and the children of it's li children are hidden.
* Clicking one of the li children toggles (see toggle()) their children.
*
* @property
* @name event.target
* @type Element
* @cat Events
*/
/**
* The pageX/Y property pair returns the mouse coordinates relative to the document.
*
* Fixed where necessary (IE).
*
* @example $("a").click(function(event) {
* alert("Current mouse position: " + event.pageX + ", " + event.pageY );
* });
* @result "Current mouse position: 130, 640"
*
* @property
* @name event.pageX/Y
* @type String
* @cat Events
*/
/**
* Stops the bubbling of an event, prohibiting other handlers to get to
* handle that event.
*
* Fixed where necessary (IE).
*
* @example $("p").click(function(event){
* event.stopPropagation();
* // do something
* });
* @desc Prohibits other event handlers to be called.
*
* @name event.stopPropagation
* @type undefined
* @cat Events
*/
/**
* Prevents the browser from executing the default action.
*
* Fixed where necessary (IE).
*
* @example $("a").click(function(event){
* event.preventDefault();
* // do something
* });
* @desc Stops the browser from changing the page to the
* href of any anchors.
*
* @name event.preventDefault
* @type undefined
* @cat Events
*/
/*
/*
* A number of helper functions used for managing events.
* A number of helper functions used for managing events.
* Many of the ideas behind this code orignated from
* Many of the ideas behind this code orignated from
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment