Pages

Sunday, November 6, 2011

How to disable right click contextual menu

Here's the jQuery snippet for it......

$(document).ready(function() {
    $(document).bind("contextmenu", function(e){
        return false;
    });
});


That's it!!!
Give it a try by right clicking on this page.....


If you have any questions, comments, or suggestions, please let me know in the comments section below!






Saturday, November 5, 2011

Getting Started....

What is jQuery?










To begin with we need to .....

Step 1 Download the latest version of jQuery 

Step 2 Link the jQuery library in the head section of your document. Like
<script type="text/javascript" src="/jquery.js"></script>

You can skip Step 1 by using one of the CDN hosted jQuery Google Ajax API CDN ,
Microsoft CDN, jQuery CDN like
<script type="text/javascript" src="http://code.jquery.com/jquery-1.7.min.js"></script>

Step 3 Execute the code when the document is ready 

$(document).ready(function(){
 // your code here
});


That's it!!!


To see jQuery in Action 


If you have any questions, comments, or suggestions, please let me know in the comments section below!

How to add jQuery to Blogger/Blogspot blogs

Adding jquery to blogspot is quite simple.....

Step 1 Login to your Dashboard


Step 2 Go to Template --> Edit HTML


Step 3 Locate <head> tag 


Step 4 Add the following code after <head> tag


<script src="//ajax.googleapis.com/ajax/libs/jquery/1.7/jquery.min.js" type="text/javascript"></script>


Step 5 Save Template


That's it!!!

If you have any questions, comments, or suggestions, please let me know in the comments section below!