I'm attempting to wrap all of my table elements in the class .table-container
but only if the class isn't already applied. This is the function that is working properly to add the styling:
attach: function (context, settings) {
("table").wrap("<div class='table-container'></div>")
}
What other jQuery needs to be applied to tell the function not to wrap the table element if the class is already being applied? (A third party manually wrapped some of the tables so I don't want to apply unnecessary CSS).