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
998d1d88
Commit
998d1d88
authored
Sep 09, 2006
by
Jörn Zaefferer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed documentation for bind(String, Function)
parent
698eafb5
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
12 deletions
+19
-12
jquery.js
src/jquery/jquery.js
+19
-12
No files found.
src/jquery/jquery.js
View file @
998d1d88
...
@@ -3158,24 +3158,31 @@ jQuery.macros = {
...
@@ -3158,24 +3158,31 @@ jQuery.macros = {
},
},
/**
/**
* Binds a particular event (like click) to a each of a set of match elements.
* Binds a handler to a particular event (like click) for each matched element.
*
* The event handler is passed an event object that you can use to prevent
* @example $("p").bind( "click", function() { alert("Hello"); } )
* default behaviour. To stop both default action and event bubbling, your handler
* has to return false.
*
* @example $("p").bind( "click", function() {
* alert( $(this).text() );
* } )
* @before <p>Hello</p>
* @before <p>Hello</p>
* @result [ <p>Hello</p> ]
* @result Hello
*
* Cancel a default action and prevent it from bubbling by returning false
* from your function.
*
*
* @example $("form").bind( "submit", function() { return false; } )
* @example $("form").bind( "submit", function() { return false; } )
* @desc Cancel a default action and prevent it from bubbling by returning false
* from your function.
*
*
* Cancel a default action by using the preventDefault method.
* @example $("form").bind( "submit", function(event) {
*
* event.preventDefault();
* @example $("form").bind( "submit", function() { e.preventDefault(); } )
* } );
* @desc Cancel only the default action by using the preventDefault method.
*
*
* Stop an event from bubbling by using the stopPropogation method.
*
*
* @example $("form").bind( "submit", function() { e.stopPropogation(); } )
* @example $("form").bind( "submit", function(event) {
* event.stopPropagation();
* } )
* @desc Stop only an event from bubbling by using the stopPropagation method.
*
*
* @name bind
* @name bind
* @type jQuery
* @type jQuery
...
...
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