Posted by: phillipnb | January 1, 2013

Interview /Multiple choice Questions for JQuery


Happy New Year

1).jQuery is a
a). JavaScript Library. b).JavaScript Language c).JavaScript Method d). PHP Method

2).jQuery is
a).Light weight b).Interpreter compiled c).parallelly processed d).Runs in js shell

3).jQuery does not support which of the following
a).HTML/DOM Manipulation b).HTML events c).AJAX d).PHP Bytecode

4).Minified and compressed version of jQuery is usually used as
a).Development version b).Production version c).Beta Version d).Alpha version

5).$(selector).action() – What does this jquery syntax format do?
a).Select an HTML element and then use HTML to act on it
b).Select an HTML element and perform some actin on it
c).Perform an action on an element and then select it
d).Perform selection and ignore the action

6).What does the dollar sign in jQuery statement do?
a).It loads the jQuery methods b).It loads the DOM c).It loads PHP d).It is used to define or access jQuery

7).Here is a jquery code:
$(document).ready(function(){});
Why do we place all jQuery methods inside this code?
a).Because jQuery is never compiled b).It shows where jQuery starts and ends
c).To enable the DOM to load jQuery d).To prevent jQuery code from running before the document is fully loaded

8).$(function(){});
What does this piece of jQuery do?
a).This is a shorter version for $(document).ready(function(){});
b).This is to test if jQuery can be loaded again
c).This is to test if jQuery has completed execution
d).This is to create a method in jQuery

9).$(‘#temp’).action()
What type of selector is used in the above jQuery syntax?
a).id selector
b).class selector
c).name selector
d).value selector

10).Which of the following jQuery syntax uses the class selector
a).$(‘#temp’) b).$(‘.temp’) c).$(‘class’) d).$(‘temp’).class

Other Questions that can be asked in JQuery

1).Give the syntax for selecting the current HTML element.
2).How do we select odd tr elements.
3).How do we write a click event that gets fired on a paragraph element.
4).We have mouse events, key board events etc. So Submit, Focus,Change etc are examples of what type of events?
5).Explain the syntax for hiding a paragraph element.
6).$(“#div_alpha”).fadeIn(1000); what does this mean?
7).Give the jQuery method name to create custom animations.
8).text() – Sets or returns the text content of selected elements – Is this true?
9).$(“#div_beta”).html(“Hello“); What is the error in this piece of code?
10).$(“p”).append(“append me at the end.”); What is the output of this jQuery?
11).Which method removes the child elements from the selected html element?

Advertisements

Responses

  1. >> $(“#div_beta”).html(“Hello“); What is the error in this piece of code?
    Can You give the ansewer, because I think is is ok.

    • Assuming div_beta is a div tag, you can use a ‘#’ if it is an id attribute. Need to see the html to decide if your syntax is right.

  2. Nice questions. this will help users to learn basics of jquery!


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Categories

%d bloggers like this: