Monthly Archives: November 2011

jQuery Mobile

http://www.youtube.com/watch?v=VY20Q6ON4QA

Posted in General | Comments Off on jQuery Mobile

Let Google Host jQuery For You

This seems to me to be a worthwhile approach to adopt if you are serving pages including the excellent Javascript library jQuery. I have learned something today – that an URL beginning with // is valid, legal, and useful. STUFF … Continue reading

Posted in General | Comments Off on Let Google Host jQuery For You

JavaScript Coding Snippets

//String.prototype.trim = function() { // return this.replace(/^\s+|\s+$/g,””); //}; // //function showTruth(b) { // return (b)? ‘true’ : ‘false’; //} // //function isInClass(obj,theClass) { // if (obj.className) { // var arrayOfClasses = obj.className.split(‘ ‘); // for (var i = 0; i … Continue reading

Posted in General | Comments Off on JavaScript Coding Snippets

JavaScript onload Chained Functions

// W I N D O W . O N L O A D //function addLoadEvent(func) { // var oldonload = window.onload; // if (typeof window.onload != ‘function’) { // window.onload = func; // } else { // window.onload = … Continue reading

Posted in General | Comments Off on JavaScript onload Chained Functions

JavaScript – What they call “Memoize”

var OBJECT_REF_CACHE = {}; // shorten typing and cache refs (see getById()) //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ function getById(id) { // shorten and memoize if (!OBJECT_REF_CACHE[id]) { OBJECT_REF_CACHE[id] = document.getElementById(id); } return OBJECT_REF_CACHE[id]; }

Posted in General | Comments Off on JavaScript – What they call “Memoize”

Apple some standard icons

http://didos-blog.blogspot.com/2011/03/uibarbuttonsystemitem-overview.html UIBarButtonSystemItemAction Constants UIBarButtonSystemItemDone The system Done button. Localized.  Available in iOS 2.0 and later. UIBarButtonSystemItemCancel The system Cancel button. Localized.  Available in iOS 2.0 and later. UIBarButtonSystemItemEdit The system Edit button. Localized.  Available in iOS 2.0 and later. UIBarButtonSystemItemSave … Continue reading

Posted in General | Comments Off on Apple some standard icons