我正在使用這些來創建可點擊的鏈接行,但我不想包含複選框,因爲我正在使用複選框來過濾另一個操作。如何防止特定目標的點擊處理程序
是否有可能除了行上的複選框?
如何防止點擊處理特定目標
jQuery(document).ready(function($) {
$(".clickable-row").click(function() {
window.document.location = $(this).data("href");
});
});
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<table class="table table-striped table-bordered table-hover table_adj table-checkable txt-col mar_bot_10">
<thead>
<tr>
<th>
<label class="mt-checkbox mt-checkbox-single mt-checkbox-outline">
<input class="mail-group-checkbox" type="checkbox" value="movetofilter"> <span></span>
</label>
</th>
<th>a</th>
<th><span data-placement="bottom" data-toggle="tooltip" title="Added Reference">b</span>
</th>
<th>c</th>
<th>d</th>
<th><span data-placement="bottom" data-toggle="tooltip" title="Received Message">e</span>
</th>
<th><span data-placement="bottom" data-toggle="tooltip" title="Received Date">f</span>
</th>
<th>g</th>
<th>h</th>
<th class="text-right">i</th>
</tr>
</thead>
<tbody>
<tr class='clickable-row' data-href='http://stackoverflow.com'>
<td>
<label class="mt-checkbox mt-checkbox-single mt-checkbox-outline">
<input class="mail-group-checkbox" type="checkbox" value="movetofilter"> <span></span>
</label>
</td>
<td>1
</td>
<td class="text70px">1</td>
<td class="text170px">1</td>
<td>212</td>
<td class="text40px">23</td>
<td class="text70px">2</td>
<td class="text40px">4</td>
<td class="text70px">5</td>
<td class="text70px text-right">6</td>
</tr>
請爲您添加html代碼。 –
請澄清您的具體問題或添加其他詳細信息,以突出顯示您的需要。正如目前所寫,很難說清楚你在問什麼 –
向我們展示一行的html –