View geolocation-sample2.html
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Location Test with Buttons</title> | |
<meta http-equiv="X-UA-Compatible" content="IE=9" /> | |
<script type="text/javascript"> | |
window.addEventListener("load", function () { | |
var nav = null; | |
var watchID; | |
startWatching.addEventListener("click", function () { |
View html5-websocket.html
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
<!DOCTYPE html> | |
<html xmlns="http://www.w3.org/1999/xhtml"> | |
<head> | |
<meta charset="utf-8" /> | |
<title>WebSocket Test</title> | |
<script type="text/javascript"> | |
var wsUri = 'ws://' + window.location.hostname + | |
window.location.pathname.replace('index.html', 'ws.ashx'); | |
var output; | |
var socket; |
View jQuery-FilterExample.js
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
var games = $(myData.products).filter(function (index) { | |
return myData.products[index].category == "Game"; | |
}); |
View jqeury-FilterResults.json
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
{ | |
"0":{"name":"Board Game 1","category":"Game","price":35}, | |
"1":{"name":"Card Game 1","category":"Game","price":8.5}, | |
"2":{"name":"Poker","category":"Game","price":75.5},"length":3, | |
"prevObject": { | |
"0":{"name":"Slinky","category":"Toy","price":9.56}, | |
"1":{"name":"Hamburger","category":"Grocery","price":2.49}, | |
"2":{"name":"Squirt Gun","category":"Toy","price":8.5}, | |
"3":{"name":"Board Game 1","category":"Game","price":35}, | |
"4":{"name":"Card Game 1","category":"Game","price":8.5}, |
View jquery-grepExample.js
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
// Get just the toys by grep on products | |
var toys = $.grep(myData.products, function (element, index) { | |
// return whether myData.products.category == 'Toy' | |
return element.category == "Toy"; | |
}); | |
// toys is a new array of the matching products | |
$.each(toys, function (i) { | |
$('#toys').append("<li class='toy'>" + toys[i].name + "</li>"); | |
}); |
View jquery-data.js
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
// start with JSON (perhaps received using $.getJSON() ) | |
var myJSONString = '{' + | |
'"products":' + | |
' ['+ | |
' { "name": "Slinky", "category": "Toy", "price": 9.56 }, ' + | |
' { "name": "Hamburger", "category": "Grocery", "price": 2.49 }, ' + | |
' { "name": "Squirt Gun", "category": "Toy", "price": 8.50 }, ' + | |
' { "name": "Board Game 1", "category": "Game", "price": 35 }, ' + | |
' { "name": "Card Game 1", "category": "Game", "price": 8.50 }, ' + | |
' { "name": "Poker", "category": "Game", "price": 75.50 }, ' + |
View footnotes-0.0.2.js
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
(function ($) { | |
$.fn.footnote = function () { | |
// console.log("footnote"); | |
var footnotes = this.find("span.footnote"); | |
footnotes.each(function (key, value) { | |
//console.log("footnote" + key + " : " + $(value).contents().text()); | |
var footnoteContentsNode = $(value).clone(); | |
var footnoteNumberTextNode = document.createTextNode("[" + key + "] "); | |
$("#references").append(footnoteNumberTextNode).append(footnoteContentsNode).css("color", "blue").append("<br />"); | |
$(value).text("[" + key + "] ").css("color", "blue").css("vertical-align", "super").css("font-size", "60%"); |
View svg-animation.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View Filterable-0.0.3.html
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<!-- | |
From http://ajpiano.com/widgetfactory/ | |
Copyright 2014 Bruce D Kyle | |
Licensed under the Apache License, Version 2.0 (the "License"); | |
you may not use this file except in compliance with the License. |
View client.js
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
$("#cheeses").filterable({ | |
className: "cheese", | |
create: function() { $("#register").addClass("ui-widget-header cheese").show(); }, | |
filtered: function(e, ui) { | |
var t = 0; | |
ui.visible.each(function() { t = t + parseFloat($(this).data("price")); }); | |
console.log( t ); | |
total.text(t.toFixed(2)); | |
}, | |
setOption: function(e, ui) { |
NewerOlder