开发者

mootools addEvent for calling 2 functions?

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜