Logo F2FInterview

jQuery Interview Questions

Q   |   QA

No

There are 3 types of selectors in Jquery
1. CSS Selector
2. XPath Selector
3. Custom Selector

There are many advantages with JQuery. Some of them are :

  • It is more like a JavaScript enhancement so there is no overhead in learning a new syntax.
  • It has the ability to keep the code simple, readable, clear and reusable.
  • It would eradicate the requirement for writing complex loops and DOM scripting library calls.

To select all elements in a page, we can use all selectors, for that we need to use *(asterisk symbol).

<script language="javascript" type="text/javascript">

         $("*").css("border", "2px dotted red");

</script>

The above code will select all elements of the web page and apply border width as 2 pixel, style as dotted and color as red.

jQuery is very compact and well written JavaScript code that increases the productivity of the developer by enabling them to achieve critical UI functionality by writing very less amount of code.

It helps to

# Improve the performance of the application
# Develop most browser compatible web page
# Implement UI related critical functionality without writing hundreds of lines of codes
# Fast
# Extensible – jQuery can be extended to implement customized behavior

Other advantages of jQuery are

# No need to learn fresh new syntax's to use jQuery, knowing simple JavaScript syntax is enough
# Simple and Cleaner code, no need to write several lines of codes to achieve complex functionality.

In order to link this F2FInterview's page as Reference on your website or Blog, click on below text area and pres (CTRL-C) to copy the code in clipboard or right click then copy the following lines after that paste into your website or Blog.

Get Reference Link To This Page: (copy below code by (CTRL-C) and paste into your website or Blog)
HTML Rendering of above code: