jQuery Wrap



$("Element").wrap("html")

The matched elements are wrapped in other elements of the structured tag, such as $("p").wrap("<div> </div>") or $("p")., Otherwise invalid. Invalid methods are: $("p").("Div") and so on


$("Element").wrap("elem")

Same as $("p").wrap($("#Element"))


$("Element").wrapAll("html")

All matching elements are wrapped in a single element


$("Element").wrapAll("elem")

Same as above, such as $("p").wrapAll($("#Element"))


$("Element").wrapInner("html")

The sub-content (including text) of each matching element is wrapped in an HTML structure


$("Element").wrapInner("elem")

Same as above, e.g. $("p").wrapInner($("#Element"))




Copyright 2014-2017 by DeveloperTut.com. All Rights Reserved.
TwitterGoogle+Facebook