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 RocknCoder = RocknCoder || {}; | |
| RocknCoder.Pages = RocknCoder.Pages || {}; | |
| RocknCoder.Pages.Kernel = function (event) { | |
| var that = this, | |
| eventType = event.type, | |
| pageName = $(this).attr("data-rockncoder-jspage"); | |
| if (RocknCoder && RocknCoder.Pages && pageName && RocknCoder.Pages[pageName] && RocknCoder.Pages[pageName][eventType]) { | |
| RocknCoder.Pages[pageName][eventType].call(that); |
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
| if(window.styleMedia.matchMedium("screen and (max-width: 480px)")){ | |
| alert("In mobile mode"); | |
| } |
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
| // Create a view of the standard size at the bottom of the screen. | |
| // Available AdSize constants are explained in GADAdSize.h. | |
| bannerView_ = [[GADBannerView alloc] initWithAdSize:kGADAdSizeBanner]; | |
| // Must be a better way to position at bottom of page | |
| [bannerView_ setCenter:CGPointMake(kGADAdSizeBanner.size.width/2, 435)]; | |
| // Specify the ad's "unit identifier." This is your AdMob Publisher ID. | |
| bannerView_.adUnitID = MY_BANNER_UNIT_ID; | |
| // Let the runtime know which UIViewController to restore after taking | |
| // the user wherever the ad goes and add it to the view hierarchy. | |
| bannerView_.rootViewController = self; |
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
| RocknCoder.Pages.managePlotChart = function () { | |
| var pageshow = function () { | |
| updateChart(); | |
| $("#refreshPlotChart").click(function(){ | |
| updateChart(); | |
| $.mobile.silentScroll(); | |
| }); | |
| }, | |
| pagehide = function () { | |
| $("#refreshPlotChart").unbind('click'); |
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
| RocknCoder.Pages.manageBarChart = function () { | |
| var pageshow = function () { | |
| updateChart(); | |
| $("#refreshBarChart").click(function(){ | |
| updateChart(); | |
| }); | |
| }, | |
| pagehide = function () { | |
| $("#refreshBarChart").unbind('click'); | |
| }, |
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> | |
| <title>JQM Charts</title> | |
| <meta name="viewport" content="width=device-width, initial-scale=1" /> | |
| <meta name="apple-mobile-web-app-capable" content="yes"/> | |
| <link href="content/jquery.mobile-1.1.0.min.css" rel="stylesheet" type="text/css" /> | |
| <link href="content/jquery.jqplot.css" rel="stylesheet" type="text/css" /> | |
| <script src="scripts/jquery-1.7.1.min.js" type="text/javascript"></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
| /* | |
| ** jQuery Mobile Calculator | |
| ** | |
| */ | |
| var RocknCoder = RocknCoder || {}; | |
| RocknCoder.Pages = RocknCoder.Pages || {}; | |
| // handles all of the page events and dispatches them to a handler, if one exists | |
| RocknCoder.Pages.Kernel = function (event) { |
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
| // create our namespace | |
| var RocknCoder = RocknCoder || {}; | |
| // this is the object that takes care of all of our twitter business | |
| RocknCoder.Tweet = function () { | |
| var searchTerm = "", | |
| $appendTo, | |
| tmpl = "", | |
| numTweets = 10, |
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 pageshow = function () { | |
| RocknCoder.Display.init($("#displayControl")[0]); | |
| $("button").tap(function(event){ | |
| var key = $(this).attr("data-rockncoder-tag"), | |
| id = this.id; | |
| event.preventDefault(); | |
| switch(id){ | |
| case "key0": | |
| case "key1": |
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 $paperTape = $("#paperTape"), | |
| $li = $("#paperTape li"), | |
| $sum = $("#sum"), | |
| height = parseInt($li.css("height"),10), | |
| top = RocknCoder.Dimensions.top, | |
| getTop = function(){ | |
| return top; | |
| }; |