出于某种原因,我在选项卡上的 jquery 不起作用,它在我正在加载的实际链接上运行良好。
这是在标头中使用的 JS:
<script type="text/javascript" src="js/jquery.easing.1.3.min.js"></script>
<script type="text/javascript" src="js/royal-slider-2.0.js"></script>
<script type="text/javascript" src="js/jquery.xdomainajax.js"></script>
<script>
$(function() {
$.internshipSlider = new RoyalSlider("#internshipPrograms", {
directionNavEnabled:true,
directionNavAutoHide:false,
controlNavEnabled:false,
welcomeScreenEnabled:false
});
$.internshipSlider.settings.beforeSlideChange = function() {
// change the "active" state for the slide in the nav
$("#nav"+this.lastSlideId).removeClass("active");
$("#nav"+this.currentSlideId).addClass("active");
}
$.internshipSlider.settings.afterSlideChange = function() {
//currently not doing anything after slide change
}
function sliderChange(slideIndex) {
// public function for changing the slides via a link
$.internshipSlider.goTo(slideIndex);
}
/* --- EXPANDED TEXT --- */
var hiddenText = true;
function toggleExpandedText () {
if (hiddenText) {
$("#text-box-expanded").show("blind");
$("#moreTextBtn").text("Hide...");
hiddenText = false;
} else {
$("#text-box-expanded").hide("blind");
$("#moreTextBtn").text("More...");
hiddenText = true;
}
}
</script>
我是否错过了将其加载到页面以使其工作的步骤?DOM 有问题?抱歉,我是新手,并且承受着快速完成这项工作的压力。我很感激这方面的任何帮助......
谢谢!