The documentation of the wrap() method asserts that a jQuery object or a string containing a selector can be passed as an argument. However, in case a selector matching more than one element or a jQuery object containing more than one element is passed, only the first (element) is used as the wrapper.
This detail is not specified and I think it's worth to add it. Any thoughts?
The documentation of the
wrap()method asserts that a jQuery object or a string containing a selector can be passed as an argument. However, in case a selector matching more than one element or a jQuery object containing more than one element is passed, only the first (element) is used as the wrapper.This detail is not specified and I think it's worth to add it. Any thoughts?