(function($){
$(window).load(function(){
/* Page Scroll to id fn call */
***$("#navigation-menu a,a[href='#top'],a[rel='m_PageScroll2id']").mPageScroll2id({
highlightSelector:"#navigation-menu a"});***
/* demo functions */
$("a[rel='next']").click(function(e){
e.preventDefault();
var to=$(this).parent().parent("section").next().attr("id");
$.mPageScroll2id("scrollTo",to);
});
});
})(jQuery);
* $("#navigation-menu a,a [href ='#top'],[rel =' m_PageScroll2id']&#34 ;)mPageScroll2id({ highlightSelector:"#navigation-menu a"}); *
未捕获的TypeError:对象[object Object]没有方法&m; 39 Page 3如图所示,任何人都可以帮我改进这段代码。
答案 0 :(得分:0)
删除
(function($){
})(jQuery);
并删除代码中的“* * *” 因为自动执行函数可以在加载mPageScroll2id之前运行