1.

How does jQuery filter () method work and write code to apply css class name for all the links in the page whose host name is not same as the hostname of the site?

Answer»

The most common way to write a for loop to create ONE array from another, or an array from an OBJECT. JQuery makes it even EASIER with the $.map utility function.

The syntax:

$.map(collection, callback); The following statement appends 1 to each element in the array and maps the array into [1, 2, 3, 4, 5]. var numbers = $.map(   [0, 1, 2, 3, 4],   function(value) {   return value + 1;   }


Discussion

No Comment Found