开发者

mootools addEvent for calling 2 functions?

开发者 https://www.devze.com 2023-03-30 16:45 出处:网络
My problem is that I\'m trying to call 2 functions in my addEvent, but it\'s not possible I think. I am developing a forum,and one of that function is for the subforum, and the other are for answers,

My problem is that I'm trying to call 2 functions in my addEvent, but it's not possible I think. I am developing a forum, and one of that function is for the subforum, and the other are for answers, all I want to do It is tha开发者_Python百科t when I press that link the link fetch all the php in a div or two div and paste the results in that. Is it possible? Is there a better way?

$$('a.hrefMosRBT').addEvent('click', 
    function(){
        mostrarTemaRespuesta(this.get('id'),mostrarSubTemasDelBuscado(this.get('id')))
    }
);


it's hard to tell what your functions do, but what is the problem with simply doing?

$$('a.hrefMosRBT').addEvent('click', function(){
    mostrarTemaRespuesta(that.get('id'));
    mostrarSubTemasDelBuscado(that.get('id'));
});
0

精彩评论

暂无评论...
验证码 换一张
取 消