Category Archives: Jquery

About Jquery
1) Cross-platform JavaScript library used to make more simpler the client-side scripting of HTML
2) Released on : January 2006
3) Author : John Resig

Regular Expression: Validate email




Jquery: Detect any change in form before submission

Hello friends, Here, we are going to detect any change in the form content before form submission. Hence, there is no meaning of submitting a form without any content change. Let’s start. Step 1: Create a java-script file(detect-form-change.js) having the logic to detect the change in form.

Step 2: Implementation of logic on forms… Read More »

Javascript: Advantages and Disadvantages of Ajax

Hello friends, Here we shall discuss about some advantages and disadvantages of using AJAX. Advantages of ajax: #1) Almost supports all modern browsers #2) Reduce the traffic travels between the client and the server. #3) Response time is faster so increases performance and speed. #4) Many open source javaScript libraries available for ajax support like… Read More »

Juqery: Detect Current Mouse Coordinates

Sometimes we need to detect mouse co-ordinates. We can easily do this in Jquery like below:

If you want to do this in javascript, then do like this:

That’s all!

Jquery: Detect Browser

Sometimes you need to determine the browser type of the browser currently in use. You can use the following piece of code to do this:

You can also check for the browser version like below:

That’s all!

Jquery: Disable/Enable Right Mouse Click

If you are using Jquery and you want to disable right click on your web browser, you can use the following piece of code:

To enable right click again, use the below code:

That’s all!

Capture section of web page and download as an image

Step 1: Following javascript libraries are required a) jquery.min.js b) html2canvas.js c) jquery.plugin.html2canvas.js d) base64.js e) canvas2image.js Download : javascript Step 2: HTML required

Convert an image to canvas and canvas to an image

Step 1: Following Javascript libraries are required a) base64.js Any image : 

Step 3: Javascript code

Javascript : Compare two dates