I have the following javascript variable:
<script>
var theme="Videocameras";
</script>
And the following html code:
<div>
<span>Tecnology</span>
<ul id="menu">
<li>
<a href="#">Multimedia</a>
<ul>
<li>
<a href="#">Videocameras</a>
</li>
<li>
<a href="#">Cameras</a>
</li>
<li>
<a href="#">MP3 and MP4</a>
</li>
</ul>
</li>
<li>
<a href="#">Telephony</a>
<ul>
<li>
<a href="#">Mobile Phones</a>
</li>
</ul>
</li>
</ul>
</div>
I would like to know how to get a unique ul that has an href inside with text that matches the value of the variable.
Could you give me a hand? Regards.
source
share