方法1
$(document).ready(function () {
code..
});
code..
});
方法2
$().ready(function () {
code..
});
code..
});
方法3
$(function () {
code..
});
code..
});
--匯出-- bcp "select * from [資料庫名稱].[dbo].[資料表名稱]" queryout 匯出檔案名稱.txt -w -U "使用者帳號" -P "使用者密碼" " ...
<ul class="navbar"> <li class="navbar-item"> <a href="javascript:;">Parent Link</a> <ul class="navbar-sub"> <li class="navbar-sub-item"> <a href="#url_redirect">One</a> </li> <li class="navbar-sub-item"> <a href="#url_redirect">Two</a> </li> <li class="navbar-sub-item"> <a href="#url_redirect">Three</a> </li> </ul> </li> <li class="navbar-item"> <a href="javascript:;">Parent Link</a> <ul class="navbar-sub"> <li class="navbar-sub-item"> <a href="#url_redirect">One</a> </li> <li class="navbar-sub-item"> <a href="#url_redirect">Two</a> </li> <li class="navbar-sub-item"> <a href="#url_redirect">Three</a> </li> </ul> </li> <li class="navbar-item"> <a href="javascript:;">Parent Link</a> <ul class="navbar-sub"> <li class="navbar-sub-item"> <a href="#url_redirect">One</a> </li> <li class="navbar-sub-item"> <a href="#url_redirect">Two</a> </li> <li class="navbar-sub-item"> <a href="#url_redirect">Three</a> </li> </ul> </li> <li class="navbar-item"> <a href="javascript:;">Parent Link</a> <ul class="navbar-sub"> <li class="navbar-sub-item"> <a href="#url_redirect">One</a> </li> <li class="navbar-sub-item"> <a href="#url_redirect">Two</a> </li> <li class="navbar-sub-item"> <a href="#url_redirect">Three</a> </li> </ul> </li> </ul>
$('.navbar').on('mouseenter focusin', '.navbar-item > a', function (e) { $(this).parent('.navbar-item') .addClass('active') .siblings('.navbar-item') .removeClass('active') });