Events: Insertion Inside
Events: Insertion Inside
target
relatedTarget
pageX
pageY
which
metaKey
Dom Manip
Insertion inside
$( "<p>Test</p>" ).prependTo( ".inner" );
$( "h2" ).prependTo( $( ".container" ) );
Ajax
$.ajax({
// The URL for the request
url: "post.php",
// The data to send (will be converted to a query string)
data: {
id: 123
},
// Whether this is a POST or GET request
type: "GET",
// The type of data we expect back
dataType : "json",
})
JSON
{} = object
[] = array
name:value,name:value
Eg.
var employees = [
{"firstName":"John", "lastName":"Doe"},
{"firstName":"Anna", "lastName":"Smith"},
{"firstName":"Peter","lastName": "Jones"}
];
usage
employees[0].firstName + " " + employees[0].lastName;
modification
employees[0].firstName = "Gilbert";
employees[0]["firstName"] = "Gilbert";