Change Default Listening Port Go to MAMP > Preferences > Ports and set Apache Port to be 80. Set up Localhosts in Hosts File Edit your hosts file so that you have some domains that will resolve to your local web server… sudo pico /etc/hosts Add the domains you want to resolve to your localhost… 127.0.0.1 […]
Use _.each(myArray,function) in place of .forEach() myRegex.test(myString) in place of .indexOf() var filter = /0{3}/; if(filter.test(orgInfo.get(‘payeeIdentifier’)) !== false){ … } Use envt.target in place of evnt.currentTarget IE doesn’t understand .trim() method, so add this… /******** FIX FOR IE TO USE TRIM() METHOD ********/ if(typeof String.prototype.trim !== ‘function’){ String.prototype.trim = function(){ return this.replace(/^\s+|\s+$/g, ”); } } IE’s […]
You can view an object’s bound events in the console with… $._data( $(‘.element’)[0], ‘events’ );
In your console, type… var sheets = document.styleSheets; var rules = 0; for(i=0; i < sheets.length; i++){ if(sheets[i].cssRules !== null){ rules = rules + sheets[i].cssRules.length; } } console.log(‘Rules = ‘+rules); IE limits rules to 4,095.
The functions.php file cannot have any spaces at the end.
Integration tests are for how users interact with an app, and unit tests are for small modules of code QUnit is a framework for writing JavaScript unit tests Simple Implementation Page (tests.php) … <link rel=”stylesheet” href=”css/qunit-1.11.0.css”> … <div id=”qunit”></div> <div id=”qunit-fixture”></div> … <script type=”text/javascript” src=”js/qunit-1.11.0.js”></script> <script type=”text/javascript” src=”js/tests.js”></script> tests.js test(“hello test”, function(){ ok( 1 == “1”, […]
Be very careful when using transition-property: all. You will get TransitionEnd events for properties that you didn’t expect to ever transition Be careful when using shorthand properties, because the number of triggered events varies between browsers Opera and IE don’t trigger events when a negative delay cancels out the duration WebKit has real issues with the priority of properties such […]
PHP will download in your localhost, instead of rendering, if your .htaccess file in the htdocs root doesn’t have this line commented out… # Use PHP5 Single php.ini as default # AddHandler application/x-httpd-php5s .php # (WNT) Removed above line which actually caused PHP to download instead of render.
Remove HTML <!– comments –> from your WordPress content. WordPress seems to choke on it and remove content following the comment even though it’s closed properly.