Uncaught TypeError: Object function(arg1 , arg2) has no method 'apply'

喜你入骨 提交于 2019-12-11 10:01:46

问题


I wanted to copy one click event from one element to another i am doing in following mannner which is not working

 var arr = $("#engagement_box_content_generic_mention>.data_box>.load_mentions_data_box");
     $.each ( arr , function( key , value){

            console.log( $(this).attr("onclick") );
            if ( key == 0 ) {
                $("#abc").click( $(this).attr('onclick') );
            }
});

console.log gives me like this print_1317(1317, 201205, 24, 11, 'no');

but when i click on applyed element abc it gives error

  Uncaught TypeError: Object print_1317(1317, 201205, 24, 11, 'no'); has no method 'apply'

thanks in advance

来源:https://stackoverflow.com/questions/10741588/uncaught-typeerror-object-functionarg1-arg2-has-no-method-apply

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!