Wrap is being used to apply css to a div around certain h3 elements with defined classes. This works flawlessly. However we'd like to have a default h3, where no class is specified have a div class wrap it. I am able to accomplish this when there is only one other class option, however our client now wants a multitude of other div h3 class options. Is there some way to accomplish this. Here is the code for just 1 other option:
- jq(".wiki-content h3[class!=red]").wrap("<div class=\"wikicontenth3\"></div>");
- jq(".wiki-content h3.pblue1").wrap("<div class=\"wikicontenth3pblue1\"></div>");
Here it is for multiple:
- jq(".wiki-content h3[class!=red]").wrap("<div class=\"wikicontenth3\"></div>");
- jq(".wiki-content h3.pblue1").wrap("<div class=\"wikicontenth3pblue1\"></div>");
- jq(".wiki-content h3.pred").wrap("<div class=\"wikicontenth3pred\"></div>");
- jq(".wiki-content h3.pgreen").wrap("<div class=\"wikicontenth3pgreen\"></div>");
- jq(".wiki-content h3.plblue").wrap("<div class=\"wikicontenth3plblue\"></div>");
- jq(".wiki-content h3.pgold").wrap("<div class=\"wikicontenth3pgold\"></div>");
- jq(".wiki-content h3.ppurple").wrap("<div class=\"wikicontenth3ppurple\"></div>");
- jq(".wiki-content h3.pablue").wrap("<div class=\"wikicontenth3pablue\"></div>");
- jq(".wiki-content h3.porange").wrap("<div class=\"wikicontenth3porange\"></div>");
It would seem I need some way of adding the other h3 classes to the exclusion comparison of the initial default h3 wrap. Any ideas? Thanks.