Found this which said:
$('<div/>').text('This is fun & stuff').html();
Found this which said:
$('<div/>').text('This is fun & stuff').html();
Found myself reading about values, variables, and literals in JavaScript.
Found myself looking up the syntax of the Array splice method.
Found a handy web-based utility for encoding/escaping text in JavaScript: Text Escaping and Unescaping in JavaScript.
Today I heard from John Resig on StackOverflow about how to clone objects using jQuery:
// Shallow copy var newObject = jQuery.extend({}, oldObject); // Deep copy var newObject = jQuery.extend(true, {}, oldObject);
Learning about the Raphaël—JavaScript Library. This can be used to do animations and drawing in HTML documents.
I was just confirming my understanding that JavaScript numbers are 64-bit (i.e. double precision) floats on all platforms and I stumbled upon this old article from Douglas Crockford: A Survey of the JavaScript Programming Language.
Found myself looking up the syntax for the JavaScript setTimeout function today.
I was working on some code the other evening and found myself needing a version of PHP’s bcmod function in JavaScript. It wasn’t already available at jsphp.co so I implemented it and posted about it to the ProgClub programming list.
Found myself using the PHP function str_pad today to format a hex string as a six digit HTML/CSS colour code.
e.g.:
$code = str_pad( dechex( $rgb ), 6, '0', STR_PAD_LEFT );
The str_pad function is implemented in JavaScript at jsphp.co.