jQuery Tutorial

jQuery Tutorials

jQuery is a small 24k (minified) JavaScript library, provides an extremely easy and powerful selectors to select almost anything you want in HTML page. In addition, it also comes with many innovative ways for DOM traversing, event handling (form, browser, mouse ,keyboard), animations effects and Ajax to simplifies the web development. It will definitely change the way you code JavaScript.

Happy learning jQuery. πŸ™‚

jQuery Quick Start

jQuery simple usage examples.

jQuery Practical Examples

Some jQuery practical usage and examples.

jQuery Selectors

Select anything you want in jQuery.

jQuery Attribute Selectors

Everything about attribute selectors in jQuery.

jQuery DOM Traversing

Everything about element traversing in jQuery.

jQuery DOM Manipulation

Everything about dom manipulation in jQuery.

jQuery HTML Form

Everything about HTML form elements in jQuery.

jQuery Effects

Everything about build-in effects in jQuery.

jQuery Event Handling

Everything about event handling in jQuery.

jQuery Browser Events

Everything about browser events in jQuery.

jQuery Mouse Events

Everything about mouse events in jQuery.

jQuery Keyboard Events

Everything about keyboard events in jQuery.

jQuery Common Problem

Some common jQuery problem and solution.

jQuery References

74 comments on “jQuery Tutorial

  1. i want to know how can we create auto download as like facebook.
    whenever we reach the end of the page it auto download how is’t its jquery?

    Reply
  2. Hi, i want to learn javascript,jquery and ajax from basics to advance .please tell me link or resources from where i can learn but not w3school as i have gone through.

    Reply
  3. Hi, i am using document.formname.submit(); in javascript which showing that submit is not a function. As i have used action,alert and many more please tell me another alternative so that i can submit the form

    Reply
    1. Try this way in javascript function…

      function demo(){
      var formName = document.ClientMaster;
      formName.method = “post”;
      formName.action = ‘addShippingAddress’;
      formName.submit();
      }

      Reply
  4. hi dear..!
    i want to use JQuery with JSF 2.0, is there any tutorial of you ? or can you guide me how can i use it ?
    please do reply Thanks πŸ™‚

    Reply
  5. I’m a regular visitor of your site to learn anything new.
    Can you please post something about Ajax and Ajax integration with Struts, Springs in your blog with some examples?

    Thanks in advance.

    Reply
  6. Hi mkyong,

    I am a fresher and I am working on J2EE.
    but from 2 week i have been in trouble resolving an issue and i think u are the right person to ask this question.

    so,the problem: i am validating a form using ajax and trying to submit it on success.
    code logic: if(validateName(name)){ return true;}

    here:validateName is an ajax-call which checks that the name is not already there in database.

    and problem here is: validateName() always returns “false”
    i personally think: there is a delay in ajax so i get the default flag which is false.

    please help

    Reply
    1. Please raise your issue in StackOverFlow and if you think it is because of delay in AJAX call please use deferred function of Jquery.

      Reply
  7. Hi Mkyong,

    Add / remove text Area dynamically using JQuery If user click on button.

    Could you please reply it’s urgent

    Thanks,

    Reply
  8. Add / remove text Area dynamically using JQuery If user click on button.

    Reply
  9. Hi Mkyong,

    I am happy to see this tutorial and it helps me to learn a lot.

    Thanks.

    Reply
  10. Thanks for writing this tutorial. Really this is very helpful…….
    please update continue…………………..

    Reply
  11. Hi,
    Thanks For ur valuable tutorials ,,All are up to date and really it helps me to know new technologies,And really thanks

    Reply
  12. Hi,

    Thanks a lot for yours tutorials. they are very useful. it’s a great pleasure to visiting your web site. thanks again ! πŸ™‚

    Reply
  13. thanks for this tutorials! can you please make a tutorial on how to integrate struts 2 with jquery (exemple:how to call struts 2 action via ajax requets)? all the jquery tutorials i’ve found use php to illustrate this. thank you!

    Reply
  14. This is very helpfull for me. Thanks to mkyong.

    Reply
  15. using Spring MVC 3, Jquery. Having a issue. Have a Java bean(course) that contains a list of another java object(module). Html/jsp file having a dynamic treeview. Click on form submit, want to send the bean to controller . My issue is how to set the list of objects in jquery to send as a parameter to controller.
    treeview is like below

    ex:
    var name = $(‘#coursename’).val();
    var desc = $(‘#folderdescrip’).val();

    alert(“name :”+name+” :::: desc :”+desc);

    $.ajax(
    {
    type: ‘POST’,
    url: ‘createcourse.htm’,
    data: “name =”+ name+”&description =”+desc,
    //how to send the list of objects here
    success: function(data)
    {
    alert(“success”)
    },

    error: function() {
    alert(‘error saving course’);
    }

    });
    Can you help some on on this issue

    Reply
  16. Hi,
    i want to upload multiple files using javastruts2.
    I tried your Struts 2 file upload example it’s working fine but can you also share the code to upload multiple files using jquery or any other plugin/uploader

    Reply
  17. Thank u mkyong…

    i want to many more example and new application for jquery

    Reply
  18. mkyong is a very good website for all the java technologies…
    i like this very much..
    almost all the topics are covered in all the java technologies..

    Reply
  19. Thanks for great tutorials

    I would like to ask you that is there any way to copy multiple rows from spreadsheet into jquery form/datatable and save (java,spring)

    Appreciate if you get chance to answer

    Dan

    Reply
  20. Hi Mkyong,

    Jquery is very nice … Could you please provide tutorial on Jquery-UI also …..

    Reply
  21. Thanks for the tutorial.. its basic but very useful,
    great job.

    Reply
  22. You rock mkyong… you almost covered jquery… thank you, hope you cover other programming languages in future…. thank you…

    Reply
  23. Really great tutorial to learn… Thanks a lot for the tutorial.

    Reply
  24. I am trying to add a class to a div while pressing down arrow key from the keyboard. When I hold the arrow key the class is added but as the key is released the class removes. My code is :

     <script type="text/javascript">
    $(document).keydown( function(event){
    									 	var keycode = (event.keyCode ? event.keyCode : event.which);
    										var elem = $("#upazilla_txt").is(":focus").toString();
    										var num_sugg = $("#check_sugg").val();
    if (elem == "true"){
    	if (keycode == "40"){
    		if (num_sugg > 0){
    			$("#x1").addClass("black_white");
    		}
    	}
    } });
    </script>

    Here : #upazilla_txt and #check_sugg are textbox.
    #x1 is a div.
    Do anybody plesase help me ? Thanks.

    Reply
  25. very informative as well as easy to learn new technologies. bookmarked.:)

    Reply
  26. I really appreciate your site contents. Hope you are going to post an ejb tutor as well. Keep it up):

    Reply
  27. Thank you very much for your exccellent examples in java technology.

    Reply
  28. Hi Yong.

    I have one complain about your site. Every link opens in new tab.
    this is not a good practice. πŸ™
    please remove target=”_blank” from ancher tags.

    Reply
  29. the tutorials and java programms which is provided is very useful for beginners

    Reply
  30. Whoa.. thanks for the tutorial.. its basic but very useful.
    thanks once again..! great job bro. πŸ˜‰

    Reply

Leave a Comment

Your email address will not be published. Required fields are marked *