0
我想在我的html页面加载时执行一些JavaScript。顶部方法populateSelectWithDates()被调用,但jquery部分没有。有任何想法吗?外部JS文件中的JQuery
function doInitialPopulation() {
//This works
populateSelectWithDates();
//This does not
$(document).ready(function() {
alert('ok');
//Credit to: http://www.pewpewlaser.com/articles/jquery-tablesorter
// Adds sort_header class to ths
$(".sortable th").addClass("sort_header");
// Adds alternating row coloring to table.
$(".sortable").tablesorter({widgets: ["zebra"]});
// Adds "over" class to rows on mouseover
$(".sortable tr").mouseover(function() {
$(this).addClass("over");
});
// Removes "over" class from rows on mouseout
$(".sortable tr").mouseout(function() {
$(this).removeClass("over");
});
});
}
你是否包含'jQuery library' .Check'console'来查找错误。 –
你有没有列出你的文件之前的jquery文件? – EmptyArsenal
我是否在外部js文件或html文件中执行jquery导入? – user1154644