1. 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
  2. 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
  3. 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
  4. Question: What is the result of this function: jQuery.makeArray (true)?

    A
    1

    B
    NaN

    C
    [true]

    D
    []

    Note: Not available
    1. Report
  5. 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
  6. 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
  7. 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
  8. 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
  9. Question: Using an element of some kind that is being hidden using .hide() and shown via .show(). Which of the following is the best way to determine if that element is currently hidden or visible on the screen?

    A
    $(element).is(":visible")

    B
    $(this).css("visibility") == "hidden"

    C
    (element).is(":invisible")

    D
    (this).css("visibile") == "hidden"

    Note: Not available
    1. Report
  10. Question: Which of the following will get the first column of all tables using jQuery?

    A
    $('table.tblItemTemplate first-child');

    B
    $('table.tblItemTemplate tr:first-child');

    C
    $('table.tblItemTemplate td:first-child');

    D
    $('tabletblItemTemplate td:first-child');

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