Change Facebook Thumbnail Image on Like Button

Here a quick and easy way to change the thumbnail image that Facebook picks for your website when a users clicks on the Like button or shares a link of your website on Facebook; Add the following line of code in HEAD section of the page: where THUMBNAIL_IMAGE.JPG is the URL to the image that […]

JavaScript: Convert String to Integer (int)

To convert strings (text) to integer (number) in JavaScript use the parseInt function. For example: document.write(parseInt(“23 years”)); Will return the number 23, the function ignores the string “years” and return the integer 23 only. Another common example is:   If you enter 4 and 5, the script will return “45”  instead of 9.  To fix use the parseInt […]

Regular Expressions: Remove Links Hashes & Mentions from Tweet

Use this regular expresion to remove URLs (http://…) hashes (#ahash) and mentions (@amention) from Tweets or any other block of text for that matter. For PHP code use: /(@|#|http\:\/\/)([a-zA-z0-9\.\/])+/   For JavaScript: ^(@|#|http\:\/\/)([a-zA-z0-9\.\/])+$    

CSS: Style Combo Box

There is no easy way to style a combo box using CSS, the best and easiest alternative I found is using the JQuery UI. JQuery UI is an amazing library that offers many widgets, interactions, effects and styles. This is a link to a combo box based on the JQuery UI auto complete library: http://jqueryui.com/demos/autocomplete/#combobox […]

Text Effects Using CSS

► CSS Text Gradients   ► Create a Letterpress Effect with CSS Text-Shadow     ► Text Embossing Technique With CSS   ► CSS Gradient / Glossy Text Effect   ► Add grunge effect to text using simple CSS   ► Text-Shadow Exposed: Make cool and clever text effects with css text-shadow      ► CSS Text-Shadow in Safari, Opera, Firefox and […]