1. Question: Consider the following code snippet:
    $('a.arrow-1').click(function () {
        $('.second-row').slideUp();
        $(this).parent('.first-row').siblings('.second-row').slideDown();
    });
    The order of the animations of this code snippet are:

    A
    The targeted parent sibling .second-row will slide up, then .second-row will slide down.

    B
    second-row will slide up, then the targeted parent sibling .second-row will slide down.

    C
    Both the targeted parent sibling .second-row will slide down and the .second-row will slide up actions will occur at the same time.

    D
    None

    Note: Not available
    1. Report
  2. Question: Consider the following code snippet:
    $('#ul1 li').live('click', function1);
    $('#ul1').after('<li id="lastLi">Last item</li>');
    Is function1 executed if "lastLi" is clicked?

    A
    Yes

    B
    No

    C
    "lastLi" does not exist.

    D
    None

    Note: Not available
    1. Report
  3. Question: Which of the following code snippets insert(s) the code snippet <font size=2> <div class="footer">footer</div> </font> at the end of div tags?

    A
    $('div').append('<div class="footer">footer</div>');

    B
    $('div').appendTo('<div class="footer">footer</div>');

    C
    $('<div class="footer">footer</div>').append('div');

    D
    $('<div class="footer">footer</div>').appendTo('div');

    Note: Not available
    1. Report
  4. Question: jQuery allows you to use ___ function to switch between showing and hiding an element.

    A
    show

    B
    hide

    C
    switch

    D
    toggle

    Note: Not available
    1. Report
  5. Question: What does $('tr.rowClass:eq(1)'); return?

    A
    One element set which is the second row of the first table.

    B
    One element set which is the first row of the first table.

    C
    A set of tr tags which have "rowClass:eq(1)" class .

    D
    A set of tr tags which have "eq(1)" class .

    Note: Not available
    1. Report
  6. Question: Which option can be used to have jQuery wait for all images to load before executing something on a page?

    A
    All jQuery code need to add inside $function() { } syntax

    B
    With jQuery, can use $(document).ready() to execute something when the DOM is loaded and$(window).load() to execute something when all other things are loaded as well, such as the images.

    C
    With jQuery, can use $(document).ready() or $(window).load() syntax as these both are the same.

    D
    $(window).onLoad(function() { })

    Note: Not available
    1. Report
  7. Question: Offset function gets the current offset of the first matched element in pixels relative to the _____.

    A
    document

    B
    parent element

    C
    children element

    D
    container

    Note: Not available
    1. Report
  8. Question: Consider the following code snippet:
    $(document).ready(function() {
      $('div').each(function(index) {
        alert(this);
      });
    });
    Which of the following objects does the 'this' variable refer to?

    A
    window

    B
    document

    C
    The current div tag of the iteration.

    D
    The last element tag in the body.

    Note: Not available
    1. Report
  9. Question: Which of the following returns the children tags of "id1"?

    A
    $('#id1').children();

    B
    $('#id1').getChildren();

    C
    children('#id1');

    D
    getChildren('#id1');

    Note: Not available
    1. Report
  10. Question: Which of the following is the correct way to select an option based on its text in jQuery?

    A
    $("#myselect option").filter(function(){ return $(this).text() == 'text';}).prop('selected', true);

    B
    $("#myselect option").prop('selected', true).text("text")

    C
    $("#myselect").filter("option").prop('selected', true).text("text");

    D
    $("#myselect").filter(function(){ return $(this).val() == 'text';}).prop('selected', true);

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