Pages
-
Recent Posts
- Which Would You Rather Have: The Planet, Or A Patent?
- How Copyright Would Make The ‘Singularity’ Infringement If It Ever Arrived
- Network Analysis Reveals Apparent (And Legally Questionable) Attack On Torrent Networks
- Court Dumps Patent Lawsuit Against Tons Of Online Retailers
- Java: Jury Says Google Did Not Infringe / Comprehensive JVM Options List
Archives
- May 2012
- April 2012
- March 2012
- February 2012
- January 2012
- December 2011
- November 2011
- October 2011
- September 2011
- August 2011
- July 2011
- June 2011
- May 2011
- April 2011
- March 2011
- February 2011
- January 2011
- December 2010
- November 2010
- October 2010
- September 2010
- August 2010
- July 2010
- June 2010
- May 2010
- April 2010
- March 2010
- February 2010
- January 2010
- December 2009
- November 2009
- October 2009
- September 2009
- August 2009
- July 2009
- June 2009
- May 2009
- April 2009
- March 2009
- February 2009
- December 2008
- November 2008
- October 2008
Meta
Category Archives: JavaScript
PHPHOST BLOG
Web Hosting Related Articles You May Need
Swap Variables in JavaScript – Different Methods
Here are some different ways to swap variable values in JavaScript. I will show swapping using a temporary variable, without a temporary variable, XOR operator and a single line swap.
Swap variable values using a temporary variable
// Using a Temp Var… Continue reading
Posted in JavaScript, Syndicated
Leave a comment
Conditional CSS and JavaScript for Different Browsers
A common technique adopted by developers is to detect browsers and conditionally differentiate CSS rules and JavaScript for specific versions of browsers. In simple words, a requirement could be that if the browser is IE, use a different set of CSS and… Continue reading
Posted in JavaScript, Syndicated
Leave a comment
Conditional CSS and JavaScript for Different Browsers
A common technique adopted by developers is to detect browsers and conditionally differentiate CSS rules and JavaScript for specific versions of browsers. In simple words, a requirement could be that if the browser is IE, use a different set of CSS and… Continue reading
Posted in JavaScript, Syndicated
Leave a comment
JavaScript: Convert CamelCase to Dashes and vice-versa
My colleague Satyam shared a nice piece of JavaScript code that converts a camelcase to dashes and dashes to Camelcase.
For eg: if the string has a camelcase in it – like ‘viceVersa’, the result expected is ‘vice-Versa’. Similarly if a string h… Continue reading
Posted in JavaScript, Syndicated
Leave a comment
JavaScript: Convert CamelCase to Dashes and vice-versa
My colleague Satyam shared a nice piece of JavaScript code that converts a camelcase to dashes and dashes to Camelcase.
For eg: if the string has a camelcase in it – like ‘viceVersa’, the result expected is ‘vice-Versa’. Similarly if a string h… Continue reading
Posted in JavaScript, Syndicated
Leave a comment
Unary plus operator in JavaScript
The unary plus (+) operator is a unary operator and converts its operand to a number, if it isn’t already. It is equivalent to the Number() constructor called as a function. Let us see some examples of the Unary + operator and what does it imply in d… Continue reading
Posted in JavaScript, Syndicated
Leave a comment
Unary plus operator in JavaScript
The unary plus (+) operator is a unary operator and converts its operand to a number, if it isn’t already. It is equivalent to the Number() constructor called as a function. Let us see some examples of the Unary + operator and what does it imply in d… Continue reading
Posted in JavaScript, Syndicated
Leave a comment
JavaScript Object can have Private Methods
I was watching a JavaScript video tutorial by Douglas Crockford where he explained private members in JavaScript. Although there are no ‘private methods’ in a JavaScript object, we can easily create something similar by defining a function variable… Continue reading
Posted in JavaScript, Syndicated
Leave a comment
JavaScript Object can have Private Methods
I was watching a JavaScript video tutorial by Douglas Crockford where he explained private members in JavaScript. Although there are no ‘private methods’ in a JavaScript object, we can easily create something similar by defining a function variable… Continue reading
Posted in JavaScript, Syndicated
Leave a comment
Array Shuffle in JavaScript
I have yet to find a script that truly does a random shuffle across all browsers using JavaScript (no frameworks). However there are a couple of scripts I use, that are ‘good-enough’ to be used when an Array has to be shuffled. One of them which wo… Continue reading
Posted in JavaScript, Syndicated
Leave a comment
LATEST NEWS
