jQuery wrap()

jQuery wrap() method wraps the specified HTML elements around each selected element. Syntax: $(selector).wrap(wrappingElement,function(index)) WrappingElement: It is a compulsory parameter. It is used to specify the HTML elements to be wrapped around each selected element. It can accept HTML elements, jQuery objects, and DOM elements as a value. Function: It is an optional function to … Read more