Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

jQuery advantages over javascript

 
Shashank Agarwalg
Ranch Hand
Posts: 110
Android Java Redhat
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hey is their any advantages of jQuery over javascript Or this is only diffrent way to write. And how can i explain jQuery.
 
Shashank Agarwalg
Ranch Hand
Posts: 110
Android Java Redhat
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
yup this links has the nice info. but what we can say in easy and simple way. if interviewer ask to me
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64980
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well, jQuery is JavaScript, so it's not really one or the other. But there are distinct advantages of using jQuery over writing raw JavaScript. These include, but are not limited to:
  • The amount of code you need to write is vastly smaller
  • It handles cross browser differences for you
  • Easy DOM manipulation
  • It presents a single events API
  • Effects such as fading, sliding and more
  • It makes Ajax much much MUCH simpler
  • and so on...

  •  
    Shashank Agarwalg
    Ranch Hand
    Posts: 110
    Android Java Redhat
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    Hey very nice info how can we say that it makes ajax simpler can we use jQuery in Ajax code in place of java script.
     
    David Newton
    Author
    Rancher
    Posts: 12617
    IntelliJ IDE Ruby
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    It's not in *place* of JavaScript, it *is* JavaScript--it's just a library.
     
    Shashank Agarwalg
    Ranch Hand
    Posts: 110
    Android Java Redhat
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    Yup i know this is library of javascript i want's to know that can i use this library or jquery syntax in ajax code.
     
    David Newton
    Author
    Rancher
    Posts: 12617
    IntelliJ IDE Ruby
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    You just asked if you could jQuery in place of JavaScript. The answer is no, because jQuery *is* JavaScript. You can use jQuery instead of the default JavaScript/browser support for Ajax (and should, since it's substantially easier, and eliminates the cross-browser headaches).
     
    Shashank Agarwalg
    Ranch Hand
    Posts: 110
    Android Java Redhat
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    Thanks . means i can use jQuery code in ajax code
     
    David Newton
    Author
    Rancher
    Posts: 12617
    IntelliJ IDE Ruby
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    ... Ajax code *is* JavaScript code.
     
    Shashank Agarwalg
    Ranch Hand
    Posts: 110
    Android Java Redhat
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    ok... ajax means asynchronus java script and xml. thanks again
     
    Deepak Bhasin
    Greenhorn
    Posts: 5
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    JQuery is unobtrusive JavaScript and it has great extent for cross browser compatibility.
    Syntax is short and sweet.
     
    • Post Reply
    • Bookmark Topic Watch Topic
    • New Topic