Friday 23 March 2018

Few Questions - Answers

1.       What is the result of NaN = = NaN?
 Answer:-  false.
- NaN stands for Not a Number.
- suppose there is a NaN as x and another NaN is y. value of both can be different.
2.       $("#a1").on("click",{times: 3},function_call);
Answer: -  Answer would be  function_call  will be executed once regardless of the number of times a1 is clicked.

3.       Mention one advantage of using $.ajax over $.get or $.post?
Answer: -  $.ajax offers error callback option

4.       What will following code do?
code:  $(“div#first , div.first , ol#items > [name$=’first’] “)
Answer:  
div#first - will select div having id as first
div.first - will select div having class as first
ol#items > [name$=’first’] “) – will select immediate child of ordered list having id as items whose name ends with ‘first’

No comments:

Post a Comment

Infinite scroll on collection page in Shopify

 Hello, Collection page structure is as followed {% paginate collection.products by 48 %} <div class="collection-content"> ...