I have this script:
<script type="text/javascript">
$(function() {
$("a", "top_menu").addClass("ui-widget ui-state-default");
});
</script>
What I want to do, is apply those classes to all anchor tags of the next div:
<!-- Top menu -->
<div class="top_menu">
<a href="test">An anchor</a>
<a href="test1">Second Anchor</a>
</div>
<!-- End Top menu -->
But it has to only apply to anchor tags of 'top_menu' div.
What's missing?, thank you.