據我所知,有趕懸停在邊框沒有什麼特別的方法,所以你需要一些解決方法。第一種方式是創建圍着桌子包裹,具有一定的像素填充外部容器,那麼你將有一些邊界,並檢測懸停在既有外部容器和內部表,就像這裏:
<script type="text/javascript">
$(function() {
var innerHover = false;
$('.inner_table')
.on('mouseover', function() {
innerHover = true;
})
.on('mouseout', function() {
innerHover = false;
});
// check if we can start resizing
$('.external_wrapper').on('click', function() {
if (!innerHover) {
// we can start resizing!
}
});
});
</script>
<div class="external_wrapper" style="padding: 3px;">
<table class="inner_table">
...
</table>
</div>
另一種方法將沿着所有四個表格邊界創建額外的細節div
,並將它們用作點擊錨點。這種方式是jQueryUI對話框小部件中的用戶。它非常靈活,因爲您不會被粘在容器邊界上。
後你有什麼到目前爲止已經試過 – Sankar