Created
November 18, 2011 08:47
-
-
Save partkyle/1375937 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Basic function definition | |
function function_name (argument) { | |
// body... | |
} | |
function function_name (argument) | |
{ | |
// body... | |
} | |
// jQuery function with a single anonymous function as an argument | |
$('test').click(function () | |
{ | |
// this is the code here | |
} | |
); | |
$('test').click(function () | |
{ | |
// this is the code here | |
}); | |
$('test').click(function () | |
{ | |
// this is the code here | |
}); | |
$('test').click( | |
function () | |
{ | |
// this is the code here | |
}); | |
$('test').click( | |
function () | |
{ | |
// this is the code here | |
} | |
); | |
$('test').click | |
( | |
function () | |
{ | |
// this is the code here | |
} | |
); | |
$('test').click(function () | |
{ | |
// this is the code here | |
} | |
); | |
// jQuery function with multiple argument (including an anonymous function) | |
$('test').bind('click', | |
function () | |
{ | |
// this is the code here | |
} | |
); | |
$('test').bind( | |
'click', | |
function () | |
{ | |
// this is the code here | |
} | |
); | |
$('test') | |
.bind( | |
'click', | |
function() | |
{ | |
} | |
); | |
$('test').click(function () { | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment