jQuery is a rich library and a very lightweight framework to provide JavaScript enhanced and modified functionality to our web page.
This is so popular because it has number of functions events, chaining properties and they make it convenient as well as easy to use.
Find some beautiful functions and their explanations in one line.
- show(): display a hidden dom , set a style property display as Block.
- hide(): Hide the selector from dom tree, visible on browser.
- animate(): Apply animation effetcs with selectors.
- empty(): Empty the the dom and also removes the child elements.
- remove(): remove selector dom from tree
- removeClass():remove class or classes from selectors
- addClass():add class or classes to the selectors
- toggleClass():add and remove simultaneously
- stop():stop the propagation of event.
- fadeIn():hide dom with a fading down effect.
- fadeOut():display dom with a fadind out effect.
- val():get the value of form elements.
- text():get the text in dom.
- html():get the HTML in dom.
- child():find the child elements in dom.
- parent():find the immediate parent elelment of the dom.
- parents():find the parents of parent of selector in the dome tree.
- siblings():find the parellel elements in the dom tree.
- slideDown():display the dom with a sliding to downwards effect.
- slideUp():hisde the dome with a sliding to up effect.
- attr():get the attribute of DOM.
- append():add the given object to the selector one after one, in a stack style. Object is added as last child always.
- prepend():add the given object to the selector , but the object is added as the first child always.
- after():add an object just after the selector.
- before():add and object just before the selector.
- css():add some inline css properties to the selector.
- first():get the first element in the childs.
- last():get the last element in the child.
- eq():find the object of equal index passed to it.
- noConflict():avoid conflicts with other javascript framework using $ as shortcut symbol.