jQuery रैपऑल () विधि :
❮ jQuery के एचटीएमएल/सीएसएस तरीके
उदाहरण
सभी <p> तत्वों के चारों ओर एक <div> तत्व लपेटें:
$("button").click(function(){
$("p").wrapAll("<div></div>");
});
परिभाषा और उपयोग
WrapAll () विधि सभी चयनित तत्वों के आसपास निर्दिष्ट HTML तत्वों को लपेटती है।
वाक्य - विन्यास
$(selector).wrapAll(wrappingElement)
Parameter | Description |
---|---|
wrappingElement | Required. Specifies what HTML element(s) to wrap around the selected elements Possible values:
|
इसे स्वयं आज़माएं - उदाहरण
बनाने के लिए document.createElement() का उपयोग कैसे करें, और इसे सभी चयनित तत्वों के चारों ओर लपेटें।
❮ jQuery के एचटीएमएल/सीएसएस तरीके