TriSTaR TriSTaR - 1 year ago 71
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>

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download