0
我已經把代碼放在https://codepen.io/fjenpen/pen/pROPov中,但是當我在https://jsfiddle.net/z05d3ufq/#flexiselDemo3中斷時查看代碼?爲什麼代碼在jsfiddle中破解
$('#flexiselDemo3 a').click(function(e) {
var target = $(this).attr("href");
$(".main .content").not(target).hide();
$(target).show();
return (false);
});
$(".main .content").hide();
var initialTarget = "#Section1";
if (location.hash.length > 0) {
initialTarget = location.hash;
}
$(initialTarget).show();
看在瀏覽器控制檯。對於初學者,你不包括jQuery –