1. Question: Consider the following code snippet:
    $('#id1').animate({width:"240px"}, { queue:false, duration:1000 }).animate({height:"320px"}, "fast");
    The order of the animations of this code snippet is ___.

    A
    First the width animation, then the height animation.

    B
    First the height animation, then the width animation.

    C
    Both the width animation and the height animation occur at the same time.

    D
    The order of animations is random.

    Note: Not available
    1. Report
  2. Question: Which of the following code snippets insert(s) the code snippet <div class="footer">footer</div> 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
  3. Question: Which option is correct to perform a synchronous AJAX request?

    A
    beforecreate: function(node,targetNode,type,to) { jQuery.ajax({ url: 'http://example.com/catalog/create/' + targetNode.id + '?name=' + encode(to.inp[0].value), success: function(result) { if(result.isOk == false) alert(result.message); } }); }

    B
    beforecreate: function(node,targetNode,type,to) { jQuery.ajax({ url: 'http://example.com/catalog/create/' + targetNode.id + '?name=' + encode(to.inp[0].value), success: function(result) { if(result.isOk == false) alert(result.message); }, async: sync(true) }); }

    C
    beforecreate: function(node,targetNode,type,to) { jQuery.ajax({ url: 'http://example.com/catalog/create/' + targetNode.id + '?name=' + encode(to.inp[0].value), success: function(result) { if(result.isOk == false) alert(result.message); }, async: false }); }

    D
    jQuery only allow asynchronous AJAX request.

    Note: Not available
    1. Report
  4. Question: Which of the following is the correct way to get "Option B" with the value '2' from following HTML code in jQuery?
    <select id='list'>
        <option value='1'>Option A</option>
        <option value='2'>Option B</option>
        <option value='3'>Option C</option>
    </select>

    A
    $("#list[value='2']").text();

    B
    $("#list option[value='2']").text();

    C
    $(this).find("option:selected").text();

    D
    element.options[element.selectedIndex].text

    Note: Not available
    1. Report
  5. Question: Consider the following code snippet:
    <ul id='id1'>
      <li id='li1'>Items 1</li>
      <li id='li2'>Items 2</li>
      <li id='li3'>Items 3</li>
    </ul>
    Which of the following code snippets returns the same result as $('#id1 li').not($('#li2'));?

    A
    $('#li2').siblings();

    B
    $('#id2').siblings('#li2');

    C
    $('#li2').children();

    D
    $('#id2').children('#li2');

    Note: Not available
    1. Report
  6. Question: If jQuery is included before another library, how can conflict between jQuery and that library be avoided?

    A
    By calling jQuery.noConflict(); right after including jQuery.

    B
    By calling jQuery.useDefault = false; right after including jQuery.

    C
    By calling jQuery.useShortcut = false; right after including jQuery.

    D
    By using the jQuery object when working with the jQuery library and using the $ object for other libraries.

    Note: Not available
    1. Report
  7. Question: Which of the following functions is/are built-in jQuery regular expression function(s)?

    A
    test

    B
    match

    C
    find

    D
    jQuery does not have built-in regular expression functions.

    Note: Not available
    1. Report
  8. Question: each() is a generic ___ function.

    A
    comparator

    B
    operator

    C
    iterator

    D
    normal

    Note: Not available
    1. Report
  9. 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
  10. 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
Copyright © 2024. Powered by Intellect Software Ltd