Showing posts with label JQuery. Show all posts
Showing posts with label JQuery. Show all posts

Tuesday, January 12, 2010

jquery interview questions and answer4

21 :: Explain the concepts of "$ function" in jQuery with an example?

The type of a function is "function".
There are a lot of anonymous functions is jquery.

$(document).ready(function() {});
$("a").click(function() {});

$.ajax({
url: "someurl.php",
success: function() {}
});

jquery interview questions and answer3

11 :: What are your tools of choice to get the jQuery job done?

For editing files, I love the e texteditor (yep, the name is “e”). It basically started as a textmate clone for windows, but since then grew into something much greater. One of the features I can’t live without now is there great multiple selection support. Hold down CTRL, select a couple words through double clicking and then type over all of them. Is that cool or what? On a sidenote, on one of my talks in Japan the audience asked why I’m so insane to use a Textmate clone through an emulated Windows on OSX - I showed them this exact feature, and they were all amazed.

jquery interview questions and answer2

1 :: What is jQuery?

jQuery is a light weight JavaScript library which provides fast and easy way of HTML DOM traversing and manipulation,its event handling,its client side animations, etc. One of the greatest features of jQuery is that jQuery supports an efficient way to implement AJAX applications because of its light weight nature and make normalize and efficient web programs.

jquery interview questions and answer1

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

NOTE: This is objective type question, Please click question title for correct answer.

Some of the common methods are :

1. Show()
2. Hide()
3. Toggle()
4. FadeIn()
5. FadeOut()

Features of Jquery
1. One can easily provide effects and can do animations.
2. Applying / Changing CSS.
3. Cool plugins.
4. Ajax support
5. DOM selection events
6. Event Handling

JQuery UI is a library which is built on top of JQuery library. JQuery UI comes with cool widgets, effects and interaction mechanism.

See below page on this site. Date Picker control used in this page to select date is an example of JQuery UI.

http://www.dotnetfunda.com/misc/topperformers.aspx

Thanks

It's really simple. One just need to add reference of javascript file(.js). Go to Jquery.com and download the latest version of jQuery. When download is completed, there is a "jQuery-1.3.2.js" in the folder. Include this file



and you good to go now for JQuery.

Note : 1.3.2 denotes the library version.. It can be vary depending upon the version of Jquery you download.

Document.ready() function is different from body onload() function because off 2 reasons.

1. We can have more than one document.ready() function in a page where we can have only one onload function.
2. Document.ready() function is called as soon as DOM is loaded where body.onload() function is called when everything gets loaded on the page that includes DOM, images and all associated resources of the page.

Dollar Sign is nothing but it's an alias for JQuery. Take a look at below jQuery code

$(document).ready(function(){



});


Over here $ sign can be replaced with "jQuery " keyword.

jQuery(document).ready(function(){



});

JQuery is Java Script library or Java Script Framework which helps in how to traverse HTML documents, do some cool animations, and add Ajax interaction to any web page. It mainly helps programmer to reduce lines of code as huge code written in Java Script, can be done easily with JQuery in few lines.