0
親divの「.row」をクリックして、その親divの中のリンク「.ExpandPane」を表示すると、リスト内の要素を切り替える次のコードがあります".row"をクリックすると、トグル機能も有効になりますリンクを取得する親divをトグルしないようにする
私はこれを解決できる方法はありますか?親のdiv ".row"のどこかをクリックして、トグル機能をアクティブにしないで通常のように機能する。 Htmlの
<div class="Row">
<a class="acceptBtn"></a>
<p>content.....</p>
<div class="ExpandPane"></div> <!-- hidden -->
</div>
<div class="Row">
<p>content...</p>
<a class="acceptBtn"></a>
<div class="ExpandPane"></div><!-- hidden -->
</div>
<div class="Row">
<p>content....</p>
<a class="acceptBtn"></a>
<div class="ExpandPane"></div><!-- hidden -->
</div>
jQueryの
$(".Row").toggle(
function() {
$(this).find('.ExpandPane').show();
//$(this).find('.PhotoShow').hide();
//$(this).find('.PhotoHide').show();
},
function() {
$(this).find('.ExpandPane').hide();
//$(this).find('.PhotoHide').hide();
//$(this).find('.PhotoShow').show();
});
$(".acceptBtn").click(function(event) {
alert("hi");
});