У меня есть div с 3 внутренними hrefs. Мне нужно сделать div clickable и унаследовать один из внутренних href. Не проблема ... однако это приводит к тому, что JS переопределяет другие ссылки внутри div, те, которые я не наследую для родительского div. Вот мой код:Как сделать div clickable, используя внутренний href, но не переопределять другие внутренние hrefs
<script>
$(document).ready(function(){
$("#Products div.product").click(function(){
window.location=$(this).find("a.product_link").attr("href"); return false;
}
);
</script>
<div class="product">
<div class="icon">
<a href="/training/programme/fire-awareness-in-the-workplace" class="product_link" title="Fire Awareness in the Workplace"><img src="/assets/public/btn_FA_icon.gif" alt="image" width="70" height="70" /></a>
</div>
<div class="summary">
<h2>Fire Awareness in the Workplace</h2>
<p>All staff must complete fire awareness training - this excellent programme is all you need to train your employees at minimum cost and disruption.</p>
</div>
<div class="btns">
<a href="/purchase/single/FA" class="single" title="Buy Now...">Buy Now...</a>
<a href="/training/preview/FA" class="single" title="Free Trial...">Free Trial...</a>
</div>
</div>
Итак ... любые идеи? :)
Brill, спасибо за это. :) –