1. Question: Consider the following code snippet:
    $('span.item').each(function (index) {
        $(this).wrap('<li>Item</li>');
    });
    What does this code snippet do?

    A
    Wraps each span tag that has class item within a li tag.

    B
    Inserts each span tag that has class item into a li tag.

    C
    Inserts <li>Item</li> into each span that has item class.

    D
    Replaces each span tag that has class item with a <li>Item</li>.

    Note: Not available
    1. Report
  2. Question: Consider the following code snippet:
    $(document).ready(function1);
    $(document).ready(function2);
    $(document).ready(function3);
    Which of the following functions are executed when DOM is ready?

    A
    function1

    B
    function2

    C
    function3

    D
    function1, function2, and function3

    E
    No function is executed.

    Note: Not available
    1. Report
  3. Question: Which of the following represents the best way to make a custom right-click menu using jQuery?

    A
    $(document).bind("contextmenu", function(event) { event.preventDefault(); $("<div class='custom-menu'>Custom menu</div>") .appendTo("body") .css({top: event.pageY + "px", left: event.pageX + "px"}); });

    B
    $(document).bind("contextrightmenu", function(event) { event.preventDefault(); $("<div class='custom-menu'>Custom menu</div>") .appendTo("body") .css({top: event.pageY + "px", left: event.pageX + "px"}); });

    C
    $(document).bind("rightclick", function(event) { event.preventDefault(); $("<div class='custom-menu'>Custom menu</div>") .appendTo("body") .css({top: event.pageY + "px", left: event.pageX + "px"}); });

    D
    None

    Note: Not available
    1. Report
  4. Question: Consider the following code snippet: $('#button1').bind('click', function(data) {...}); What is the data argument?

    A
    Click event's data

    B
    Function's data

    C
    Global variable

    D
    Local variable

    Note: Not available
    1. Report
  5. Question: Consider the following code snippet: [code] <font size=2> <ul id='id1'> <li id='li1'>Items 1</li> <li id='li2'>Items 2</li> <li id='li3'>Items 3</li> </ul> </font> [code] Which of the following code snippets return(s) a set of all li tags within "id1" except for li tag with id "li2"?

    A
    $('#id1 li').not($('#li2'));

    B
    $('#id1 li').except($('#li2'));

    C
    $('#id1 li').remove($('#li2'));

    D
    $('#id1 li').delete($('#li2'));

    Note: Not available
    1. Report
  6. Question: What is the result of this function: jQuery.makeArray (true)?

    A
    1

    B
    NaN

    C
    [true]

    D
    []

    Note: Not available
    1. Report
  7. Question: Which of the following is the correct way to get the value of a textbox using id in jQuery?

    A
    $(“.textbox”).text()

    B
    $(“#textbox”).val()

    C
    $(“.textbox”).val()

    D
    $(“#textbox”).text()

    Note: Not available
    1. Report
  8. Question: The hide() function hides an element by _____.

    A
    setting "display" inline style attribute of that element to "none".

    B
    setting "visibility" inline style attribute of that element to "hidden".

    C
    setting the horizontal attribute of that element to "-100".

    D
    setting the vertical attribute of that element to "-100".

    Note: Not available
    1. Report
  9. Question: Consider the following code snippet:
    $('#table1').find('tr').filter(function(index) { return index % 3 == 0}).addClass('firstRowClass');
    The result of the above code snippet is _____.

    A
    The rows of table1 at order 3n + 1 (n = 0, 1, 2,...) will belong to the class firstRowClass.

    B
    The rows of table1 at order 3n (n = 1, 2,...) will belong to the class firstRowClass.

    C
    All rows of table1 will belong to the class firstRowClass.

    D
    No row of table1 will belong to the class firstRowClass.

    Note: Not available
    1. Report
  10. Question: One advantage of $.ajax function over $.get or $.post is that _____.

    A
    $.ajax offers error callback option.

    B
    $.ajax is easier to use.

    C
    $.ajax allows passing request parameters.

    D
    the result of $.ajax is formatted.

    Note: Not available
    1. Report
Copyright © 2025. Powered by Intellect Software Ltd