Posts

How To Develop a jQuery Plugin

jQuery is the most popular JavaScript library and many sites adopt it for dynamic effects and Ajax functionality. However, relatively few developers delve into the depths of plugin development. Why Create a jQuery Plugin? In a word: re-use. By extending jQuery, you create reusable components that can be used on any web page. Your code is encapsulated and there is less risk that you will use the same function names elsewhere.

Add a "Share on Facebook" button to a webpage.

Copy the script for the style you'd like : Copy and paste the following code blocks into your site and replace '' with the link you want to Share. Text link: <script>function fbs_click() {u=location.href;t=document.title;window.open('http://www.facebook.com/sharer.php?u='+encodeURIComponent(u)+'&t='+encodeURIComponent(t),'sharer','toolbar=0,status=0,width=626,height=436');return false;}</script><a rel="nofollow" href="http://www.facebook.com/share.php?u=<;url>" onclick="return fbs_click()" target="_blank">Share on Facebook</a>

Twitter, PHP oAuth: update status

Recently Twitter announced they are going disable basic authentication mechanism. Basic auth can be used until June 30th 2010, so there is only less then one month left (assuming you are reading this on June 2010). I admit that for a long time i neglected the OAuth Twitter authorization, it seemed complicated and time consuming in comparison basic auth.

How to clear Facebook Share’s Cache

Facebook share is good, simple, lets us share almost everything on web in seconds. But Facebook caches already shared urls/pages for better performance. This causes issues at time when we update the title, picture being shared or the description of the page because facebook still shows the older version of the page.

Get URL Parameters Using Javascript

<script> function getQueryVariable(variable) { var query = window.location.search.substring(1); var vars = query.split("&"); for (var i=0;i<vars.length;i++) { var pair = vars[i].split("="); if (pair[0] == variable) { return pair[1]; } } alert('Query Variable ' + variable + ' not found'); } </script> Now make a request to page.html?x=Hello <script> alert( getQueryVariable("x") ); </script>

Jquery Validation with custom message

You can validate the HTML form using the Jquery with your custom error message. This is very easy to implement and require little knowledge of jquery.

How to make bootable pen drive

Image
Requirements: *USB Flash Drive (Minimum 4GB) *Windows 7 or Vista installation files. Follow the below steps to create bootable Windows 7/Vista USB drive using which you can install Windows 7/Vista easily. 1 . Plug-in your USB flash drive to USB port and move all the contents from USB drive to a safe location on your system. 2 . Open Command Prompt with admin rights. Use any of the below methods to open Command Prompt with admin rights. *Type cmd in Start menu search box and hit Ctrl + Shift + Enter . Or *Go to Start menu > All programs > Accessories, right click on Command Prompt and select Run as administrator. 3 . You need to know about the USB drive a little bit. Type in the following commands in the command prompt: First type DISKPART and hit enter to see the below message. Next type LIST DISK command and note down the Disk number (ex: Disk 1) of your USB flash drive. In the below screenshot my Flash Drive Disk no is Disk 1 . 4 . Next type all the below co...