1).What is Jquery?
jquery is javascript library which required a jquery.js file. After that you can write the jquery as fallows. It uses "$" as the short hand to write jquery code.
Simple Syntax is
jquery is javascript library which required a jquery.js file. After that you can write the jquery as fallows. It uses "$" as the short hand to write jquery code.
Simple Syntax is
Code:
$(document).ready(function()
{
function body
});
{
function body
});
2).When Jquery founded and by whome?
It was released in January 2006 at BarCamp NYC by John Resig(Jquery founder).
3).What scripting language is jQuery written in?
Ans: JavaScript
4).Write a basic code for add jquery library to pages?
Code:
<html>
<head>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript">
// You can write the code here
</script>
</head>
<body>
<a href="http://www.tutoriz.com/">Jquery Interview Questions and Answers</a>
</body>
</html>
<head>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript">
// You can write the code here
</script>
</head>
<body>
<a href="http://www.tutoriz.com/">Jquery Interview Questions and Answers</a>
</body>
</html>
5).What is jQuery Selectors? Give some examples.
Ans: Selectors are used in jQuery to find out DOM elements. Selectors can find the elements via ID, CSS, Element name and hierarchical position of the element.
Code:
Selector Example Selects
* $("*") All elements
#id $("#lastname") The element with id=lastname
.class $(".intro") All elements with class="intro"
element $("p") All p elements
* $("*") All elements
#id $("#lastname") The element with id=lastname
.class $(".intro") All elements with class="intro"
element $("p") All p elements
6).What $("div.tutoriz") will select?
Ans: All the div element with tutoriz class.
7).jQuery uses CSS selectors and XPath expressions to select elements true or false?
Ans:- True
8).What are the fastest selectors in Jquery?
Ans: ID and element selectors are the fastest selectors
9).What are the slower selecoters in Jquery?
Ans: Class selectors are slower
10).Which one is faster Jquery ID selector or JavaScript getElementById()?
(Jquery ID selector vs JavaScript getElementById())
Ans: JavaScript getElementById() is faster than Jquery Id ($("#elementID")) selector

0 comments:
Post a Comment