I am using the script beneath to make a toggle menu onclick. This works fine, but I don't know if it is good to use Javascript
with an onclick attribute. Would this be a problem? It is visible now in the DOM if you use e.g. Firebug
.
<a href="#" class="button" onclick="javascript:showElement('v-menu')">
<span>Click Here</span>
</a>
<ul id="v-menu" class="v-menu" style="display:none;">
</ul>
If it is harmful; how can I hide it? What should I have to do?
PS: I am using Wordpress and jQuery did not work there. THat's why I used this method.