This file contains hidden or 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
(function($) { | |
/* by Elijah Manor with collaboration from Doug Neiner | |
* Filter results by html5 data attributes either at | |
* design or at runtime | |
* | |
* Usages: | |
* $( "p" ).filterByData( "mytype" ); | |
* $( "p" ).filterByData( "mytype, "mydata" ); | |
*/ |
This file contains hidden or 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
// Define what a getTweets request looks like... | |
amplify.request.define( "getTweets", "ajax", { | |
url: "http://twitter.com/status/" + | |
"user_timeline/{userName}.json" + | |
"?count={count}&callback=?", | |
dataType: "json", | |
type: "GET" | |
}); | |
// You can redefine the request to mock out the response |
This file contains hidden or 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
zebraTable(); | |
$( ".delete" ).bind( "click", function() { | |
var $this = $( this ), | |
$row = $this.closest( "tr" ), | |
rowId = $row.attr( "id" ); | |
$.ajax({ | |
url: "/Contact/Delete/" + rowId, | |
type: "POST", |
This file contains hidden or 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
zebraTable(); | |
$( ".delete" ).bind( "click", function() { | |
var $this = $( this ), | |
$row = $this.closest( "tr" ), | |
rowId = $row.attr( "id" ); | |
$.ajax({ | |
url: "/Contact/Delete/" + rowId, | |
type: "POST", |
This file contains hidden or 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
var contact = {}; | |
$.get( "/Contact/Details/42", function( data ) { | |
contact = data.contact; | |
}); | |
console.log( "Hello " + contact.firstName + " " + contact.lastName ); |
This file contains hidden or 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
var contact = {}; | |
$.get( "/Contact/Details/42", function( data ) { | |
contact = data.contact; | |
console.log( "Hello " + contact.firstName + " " + | |
contact.lastName ); | |
}); |
This file contains hidden or 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
<ul id="numberList"> | |
<li data-value="1">One</li> | |
<li data-value="2">Two</li> | |
<li data-value="3">Three</li> | |
<li data-value="4">Four</li> | |
<li data-value="5">Five</li> | |
<li data-value="6">Six</li> | |
<li data-value="7">Seven</li> | |
<li data-value="8">Eight</li> | |
<li data-value="9">Nine</li> |
This file contains hidden or 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
{ | |
"name" : "Elijah Manor", | |
"priorities" : [ "Christian", "Family", "Work" ], | |
"employer" : "appendTo", | |
"title" : "Senior Architect", | |
"twitter" : "@elijahmanor", | |
"tech" : [ "JavaScript", "jQuery" ], | |
"awards" : [ "ASP.NET MVP", "ASPInsider" ] | |
} |
This file contains hidden or 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
<ul id="numberList"> | |
<li data-value="1">One</li> | |
<li data-value="2">Two</li> | |
<li data-value="3">Three</li> | |
<li data-value="4">Four</li> | |
<li data-value="5">Five</li> | |
<li data-value="6">Six</li> | |
<li data-value="7">Seven</li> | |
<li data-value="8">Eight</li> | |
<li data-value="9">Nine</li> |
This file contains hidden or 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
<ul id="numberList"> | |
<li data-value="1">One</li> | |
<li data-value="2">Two</li> | |
<li data-value="3">Three</li> | |
<li data-value="4">Four</li> | |
<li data-value="5">Five</li> | |
<li data-value="6">Six</li> | |
<li data-value="7">Seven</li> | |
<li data-value="8">Eight</li> | |
<li data-value="9">Nine</li> |