Note that there are some explanatory texts on larger screens.

plurals
  1. POJquery add divs around html in a closed CMS
    text
    copied!<p>I have searched and tried as much as I can but am stumped and would like to reach out.</p> <p>I would like to use Javascript/Jquery which this closed cms allows to somehow surround 2 lists within a div.</p> <p>Here is what the current code looks like below. The closed cms is written this way and can't be changed:</p> <pre><code>&lt;div id="details"&gt; &lt;div id="otherstuff"&gt; dynamic text &lt;/div&gt; &lt;ul class="info left"&gt; &lt;li&gt;dynamic text&lt;/li&gt; &lt;li&gt;dynamic text&lt;/li&gt; &lt;li&gt;dynamic text&lt;/li&gt; &lt;/ul&gt; &lt;ul class="info right"&gt; &lt;li&gt;dynamic text&lt;/li&gt; &lt;li&gt;dynamic text&lt;/li&gt; &lt;li&gt;dynamic text&lt;/li&gt; &lt;/ul&gt; &lt;div id="more stuff"&gt; dynamic text &lt;/div&gt; &lt;/div&gt; </code></pre> <p>Here is what I am trying to achieve with some sort of find/replace so that the UL's can be surrounded by its own div with its own id.</p> <pre><code>&lt;div id="details"&gt; &lt;div id="otherstuff"&gt; dynamic text &lt;/div&gt; &lt;div id="NEWLISTDIV"&gt; &lt;ul class="info left"&gt; &lt;li&gt;dynamic text&lt;/li&gt; &lt;li&gt;dynamic text&lt;/li&gt; &lt;li&gt;dynamic text&lt;/li&gt; &lt;/ul&gt; &lt;ul class="info right"&gt; &lt;li&gt;dynamic text&lt;/li&gt; &lt;li&gt;dynamic text&lt;/li&gt; &lt;li&gt;dynamic text&lt;/li&gt; &lt;/ul&gt; &lt;/div&gt; &lt;div id="more stuff"&gt; dynamic text &lt;/div&gt; &lt;/div&gt; </code></pre> <p>I have seen various scripts here to find and replace text but have yet to find a solution to the above. Your help is much appreciated.</p> <p>(this closed cms allows Javascript and if Jquery is used has to use noconflict to work)</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload