My program generates the following html code. And I need to adjust it via client side scripting (jquery) in order to look exactly the code I have found extreme below. Please note I can't modify the code server-side. I need to remove ul and li tags while retaining the href links and tag names and add a css class. I also need to remove the given font size: 10px. I am not very expert in js so I need your help figuring out how to do that. I have tried some scripts including the following but it entirely removes all the li tags and their contents.
<script type="text/javascript">
var lis = document.querySelectorAll('.Zend_Tag_Cloud li');
for(var i=0; li=lis[i]; i++) {
li.parentNode.removeChild(li);
}
</script>
The original code generated by my program:
<ul class="Zend_Tag_Cloud">
<li>
<a href="/content/article/tag/136/" style="font-size: 10px;">workout definition</a>
</li>
<li>
<a href="/content/article/tag/140/" style="font-size: 20px;">workout plans for men</a>
</li>
<li>
<a href="/content/article/tag/139/" style="font-size: 20px;">workout program</a>
</li>
<li>
<a href="/content/article/tag/141/" style="font-size: 20px;">workout routines for beginners</a>
</li>
<li>
<a href="/content/article/tag/138/" style="font-size: 20px;">workout schedule</a>
</li>
<li>
<a href="/content/article/tag/137/" style="font-size: 20px;">workouts at home</a>
</li>
</ul>
The final html code should look like the following:
<a class="in-the-news-bar__link" href="/content/article/tag/136/">workout definition</a>
<a class="in-the-news-bar__link" href="/content/article/tag/140/">workout plans for men</a>
<a class="in-the-news-bar__link" href="/content/article/tag/139/">workout program</a>
<a class="in-the-news-bar__link" href="/content/article/tag/141/">workout routines for beginners</a>
<a class="in-the-news-bar__link" href="/content/article/tag/138/">workout schedule</a>
<a class="in-the-news-bar__link" href="/content/article/tag/137/">workouts at home</a>