Uncaught TypeError: ((n.event.special[g.origType] || (intermediate value)).handle || g.handler).appl

惯例:

我是温浩然:

chrome浏览器报错

Uncaught TypeError: ((n.event.special[g.origType] || (intermediate value)).handle || g.handler).apply is not a function


我这个错误,与这个错误并不一样

http://blog.csdn.net/a15937822658/article/details/12841643


页面代码如下:


然后,JS代码如下:

var INDEX = {
	init:function(el){
		INDEX.buidEevnt();
	},
	buidEevnt:function(){
		$('#side-menu').on('click','#myattention',INDEX.myAttention);
		$('#side-menu').on('click','#postManager',INDEX.postManager);
		$('#side-menu').on('click','.otherBoardList',INDEX.showOtherBoardList);
		$('#side-menu').on('click','.allBoardList',INDEX.showallBoardList);
		$('#side-menu').on('click','.boardList',INDEX.showallBoardListManager);
	},
    
    //我的关注
	myAttention:function(){
    	$.postJson(cp+'/pcir/del',function(result){
    		$('#wrapper').html(result);	
		});
    },
    
    //版块类别管理
    postManager:function(){
    	$.postJson(cp+'/pcir/del',function(result){
    		$('#wrapper').html(result);	
		});
    },
    
    //其他版块列表
    otherBoardList:function(){
    	var el=$(this);
    	alert(el.attr('data-boardtype-id'));
    	$.get(cp+'/post/showbtn/'+el.attr('data-boardtype-id'),function(result){
    		alert(result);
    		$('#wrapper').html(result);	
		});
    },
    
    //帖子管理界面
    allBoardList:function(){
    	var el=$(this);
    	$.get(cp+'/post/showbtn/'+el.attr('data-boardType-id'),function(result){
    		alert(result);
    		$('#wrapper').html(result);	
		});
    },
    
    //板块管理界面
    allBoardListManager:function(){
    	var el=$(this);
    	$.get(cp+'/pboard/show/'+el.attr('data-boardType-id'),function(result){
    		alert(result);
    		$('#wrapper').html(result);	
		});
    }
}
INDEX.init();

错误原因,上面方法名与下面的方法名不一致导致的错误。

$('#side-menu').on('click','.otherBoardList',INDEX.showOtherBoardList);
//其他版块列表
    otherBoardList:function(){
    	var el=$(this);
    	alert(el.attr('data-boardtype-id'));
    	$.get(cp+'/post/showbtn/'+el.attr('data-boardtype-id'),function(result){
    		alert(result);
    		$('#wrapper').html(result);	
		});
    },



你可能感兴趣的:(Uncaught TypeError: ((n.event.special[g.origType] || (intermediate value)).handle || g.handler).appl)