JQuery is a fast, lightweight, open source and feature rich JavaScript library which helps in interaction between JavaScript and HTML. It simplifies using JavaScript on your website. It is helpful in making interactive and creative web pages easily. It contains all the common DOM, event, effects, and Ajax functions in a single JavaScript file. JQuery file needs to be included from a CDN if you want to use JQuery functionality in your program.
Effects and animations, Ajax, Extensibility, DOM element selections functions, Events, CSS manipulation, Utilities - such as browser version and the each function, JavaScript Plug-ins, DOM traversal and modification.
JQuery is a concise library for developing Javascript and Ajax programming. With its use, you can make the code simple and reusable. JQuery can also manipulate CSS, quickly handle events, make animations etc. in web applications.
Yes, in JQuery there are three methods for the same which are fadeIn(), fadeout() and fadeTo(). For changing the opacity of elements in animation, we use them.
The bind() method will attach one or more event handler to the elements. This method will not attach events to those elements which are added after DOM is loaded while live() and delegate() methods attach events to the future elements also. live() function will not work in chaining. It will work only on an selector or an element. delegate() method can work in chaining.
These methods are.empty(), .remove() and .detach() . In JQuery, empty() method is used to remove all the child elements from matched elements. remove() method is used to remove all the matched element. This method removes all the JQuery data associated with the matched element. detach() method removes selected elements no matter they are text or child nodes but it does not remove JQuery data associated with the matched elements. remove() is faster than empty() or detach() methods.
The resize() function is called whenever the browser size is changed. This event can be only used with $(window). Its syntax is .resize([event_data], handler(event_object)). The 'event_data' is the data to be sent to the handler. The 'handler(event_object)' is a function to be called each time when the window is resized.
Find() method is used whenever you want to search more than one level in DOM tree as it can traverse multiple or all levels down the DOM tree but children() can travel only single level down in the DOM tree.
The basic difference is that size() is a method and length is a property however, both size() and length return the number of elements in an object.
The four parameters which are used are: URL where we need to specify the URL to send the request, type which specifies type of request(Get or Post), data which specifies data to be sent to server and Cache tells us whether the browser should cache the requested page.