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 ( $ ) { | |
| $.mockJSON.data.COUNTRY_NAME = [ "United States", "Canada", "Afghanistan", "Albania", "Algeria", "American Samoa", "Andorra", "Angola", "Anguilla", "Antarctica", "Antigua and/or Barbuda", "Argentina", "Armenia", "Aruba", "Australia", "Austria", "Azerbaijan", "Bahamas", "Bahrain", "Bangladesh", "Barbados", "Belarus", "Belgium", "Belize", "Benin", "Bermuda", "Bhutan", "Bolivia", "Bosnia and Herzegovina", "Botswana", "Bouvet Island", "Brazil", "British lndian Ocean Territory", "Brunei Darussalam", "Bulgaria", "Burkina Faso", "Burundi", "Cambodia", "Cameroon", "Cape Verde", "Cayman Islands", "Central African Republic", "Chad", "Chile", "China", "Christmas Island", "Cocos (Keeling) Islands", "Colombia", "Comoros", "Congo", "Cook Islands", "Costa Rica", "Croatia (Hrvatska)", "Cuba", "Cyprus", "Czech Republic", "Denmark", "Djibouti", "Dominica", "Dominican Republic", "East Timor", "Ecudaor", "Egypt", "El Salvador", "Equatorial Guinea", "Eritrea", "Estonia", "Ethiopia", "Falkland Islands (Malvinas) |
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
| // Observer is attached to the #pigs element where impact events are delegated | |
| $( "#pigs" ).on( "impact", ".pig", function( e ) { | |
| console.log( "I know which pig was impacted: " + e.target.innerHTML ); | |
| console.log( "I know where the subscribers are listed: " + e.delegateTarget.id ); | |
| console.log( "I can invoke another subscriber if I want!" ); | |
| $._data( e.delegateTarget, "events" ).secret[ 0 ].handler( e ); | |
| $( this ).text( "Bacon" ); | |
| }); | |
| $( "#pigs" ).on( "secret", ".pig", function( e ) { |
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
| <!DOCTYPE html> | |
| <html> | |
| <head lang="en"> | |
| <meta charset="utf-8"> | |
| <title>Angry Birds</title> | |
| <link rel="stylesheet" href="./css/style.css"> | |
| </head> | |
| <body> | |
| <script src="./libs/jquery.min.js"></script> | |
| <script src="./libs/postal.min.js"></script> |
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( [ "postal" ], function( postal ) { | |
| return { | |
| bus: postal.channel({ channel: "main" }) | |
| }; | |
| }); |
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
| /*jshint maxparams:3, maxdepth:2, maxstatements:5, maxcomplexity:3, maxlen:80 */ | |
| /*global console:false */ | |
| (function( undefined ) { | |
| "use strict"; | |
| function test1( arg1, arg2, arg3, arg4 ) { | |
| console.log( "too many parameters!" ); | |
| if ( arg1 === 1 ) { | |
| console.log( arg1 ); |
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
| <form class="well"> | |
| <label for="userName">User Name</label> | |
| <input id="userName" type="text" class="span3" placeholder="Enter Name Here…"> | |
| <button type="submit" class="btn btn-primary">Get Tweets</button> | |
| </form> | |
| <ul class="tweets"></ul> |
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( twitter, $, undefined ) { | |
| var _selection; | |
| twitter.init = function( $selection ) { | |
| _selection = $selection; | |
| }; | |
| twitter.displayTweets = function( tweets ) { | |
| var $list = $( "<ul/ >" ); | |
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
| /*! | |
| * jquery-win8-deferred - jQuery $.when that understands WinJS.promise | |
| * version: 0.1 | |
| * author: appendTo, LLC | |
| * copyright: 2012 | |
| * license: MIT (http://www.opensource.org/licenses/mit-license) | |
| * date: Thu, 01 Nov 2012 07:38:13 GMT | |
| */ | |
| (function () { | |
| var $when = $.when; |
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
| module.exports = function(grunt) { | |
| // Project configuration. | |
| grunt.initConfig({ | |
| pkg: grunt.file.readJSON('package.json'), | |
| uglify: { | |
| options: { | |
| banner: '/*! <%= pkg.name %> <%= grunt.template.today("yyyy-mm-dd") %> */\n' | |
| }, | |
| build: { | |
| src: 'src/<%= pkg.name %>.js', |
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
| alert("test"); |