我有一个菜单
<div class="nav_bar" style="background: url(../images/nav.jpg) repeat scroll 0px 0px transparent;">
<div id="navID" class="ddsmoothmenu">
<ul id='Ul2'>
<li id='Li6'><a href="inner.php" title="Home">Home </a>
</li>
</ul>
<ul id='Ul4' >
<li id='Li1' ><a href="#" title="Master">Car </a>
<ul>
<li id='Li10'><a href="#" title="Plan Type">Fuel</a>
<ul>
<li id='Li10' ><a href="Petrol.php" title="Petrol">Petrol </a> </li>
<li id='Li10' ><a href="Diesel.php" title="Diesel">Diesel </a></li> </li>
</ul>
</li>
</ul>
</li>
</div>
</div>
是否可以调用事件或函数来单击 div nav_bar 中的任何锚标记?我努力了
$(".nav_bar #navID").click(function(e) {
alert("hai");
});
但它不起作用
提前致谢