TriSTaR TriSTaR - 11 months ago 52
CSS Question

Jquery .prependTo() use for the tag

how to use prependTo to add class

<div class="table-responsive">
above tag table?

I know how it works, but it is before the TABLE tag does not put the div with the class

Answer Source

You can use wrap():

$( "table" ).wrap( "<div class='table-responsive'></div>" );
  border:solid 1px red;

table, td{
    border:solid 1px green;
<script src=""></script>