How To Pass Named Parameters in Javascript

Author: , December 5th, 2020

How To Fix “TypeError: Language code” JavaScript Errors in WordPress

Author: , January 20th, 2020

PROBLEM Wordpress site broken with Javascript errors with zero plugins or themes installed. The issue followed different devices, OS’es and different browsers. SOLUTION User account corrupted. The wp_usermeta locale field had an invalid value of “regular”, and nulling the field solved the issue. DETAILS JS console shows this:

How To Scroll to the Top of the Page using Javascript

Author: , March 20th, 2018

window.scrollTo(x-coord, y-coord); Example: window.scrollTo(0,0);

How To Fix WordPress 3.8 Bugs

Author: , January 29th, 2014

Edit the wp-config.php file in the root of your WordPress Install. Search for this line: require_once(ABSPATH . ‘wp-settings.php’); Just before it add this line: define(‘CONCATENATE_SCRIPTS’, false ); Save, exit and refresh the page in your browser. It would also be a good idea to empty your browser cache. Original Post:

How To Round And Format Numbers In JavaScript

Author: , September 23rd, 2012

How To Install LESSC Using node.js

Author: , April 26th, 2012

I did this as root. YMMV… gem uninstall less (just in case you used the old way…) git clone git:// (or use wget; tar xvzf node-*) cd node ./configure make make install cd .. curl | sh npm install less ln -s /usr/lib/nodejs/less/bin/lessc /usr/bin/lessc

How To Escape Newlines In PHP For Javascript

Author: , January 11th, 2012

You must use all three lines together for it to work…YMMV:

How To Use Regular Expressions In JavaScript

Author: , November 3rd, 2011

RegExp.exec(string) Applies the RegExp to the given string, and returns the match information.

match then contains [“Sample”,”amp”] RegExp.test(string) Tests if the given string matches the Regexp, and returns true if matching, false if not.

match then contains false String.match(pattern) Matches given string with the RegExp. With g flag returns an array containing the […]

How To Validate Passwords Using jQuery

Author: , October 19th, 2011

The ability to validate BEFORE a form is submitted greatly reduces end-user frustration by telling the user immediately what the issue is. The jQuery Validation plugin does just that. Here is a link to the plugin’s home page: This is a simple recipe for doing custom password validation: In the html head

In […]

How To Use a Spinner With jquery.pager

Author: , September 26th, 2011

Just an addendum to the previous post about ajax loader spinner images…