jQuery Tutorial


jQuery Example


jQuery References


jQuery HTML wrap() Method Reference


  All jQuery with HTML Method References


Uses

jQuery wrap() method around the HTML selected element.


Syntax

$(selector).wrap(wrapelement)

jQuery wrap() method supported following parameters.

ParameterDescription
wrapelementwrapelelement is Required parameter. html element like <div></div> etc.

jQuery wrap() Method Example

<script type="text/javascript"> 
$(document).ready(function(){
  $("button").click(function(){
    $("p").wrap("<div></div>");
  });
});
</script>
Online Try This Code Your Self....   »

  All jQuery with HTML Method References