Tag Archives: javascript

Javascript Function Skeleton

(function(){ var functionName = function(){ this.init(); }; functionName.prototype = { init : function() { this.setFunction(); }, setFunction : function() { // do stuff here } }; new functionName(); })();

Posted in Code Snippets | Tagged | Leave a comment

Focus First Input Field

Here’s a handy little snippet to automatically put the cursor in the first input field on the page. You can override it by adding a class of “nofocus” to any element and/or list the elements in the array. Nice for … Continue reading

Posted in Code Snippets | Tagged | Leave a comment