Encode Colon “:”

If you use URIencode() method you will find that some special characters (, / ? : @ & = + $ #) including colon is not encoded to ‘%3A’. To overcome this issue, you should use encodeURIComponent()...

JSON date string to Date Object using RegEx

JSON has become de-facto standard for web services. When you use JSON in web services the date is returned as some numbers. How to convert it to readable date format? Checkout the following code on how we utilise Regular Expression to tackle this.. var prettyDate =...
Get Reference to Canvas using jQuery

Get Reference to Canvas using jQuery

You can use JavaScript to get reference to a canvas in HTML5 but if you are someone so much into jQuery then you can use the following method to get reference to canvas using jQuery. Old School Way var canvas = document.getElementById("canvas"); var context =...

Dynamically List JQuery Mobile (Style Issue)

Recently I’ve been working on Mobile Jquery and stuff. I was doing a dynamic listview with mobile jquery and when is loaded it is very plain and no styles were applied. After searching online for a while I figure out we need to refresh the list to apply the...