Jquery到Mootools

Sta*_*boy 2 javascript jquery mootools

试图让这个(简单!)jQuery表达式在Mootools中运行

jQuery的:

    checkCurrentModule = function(){
        jQuery(".module ul li.current").prepend("<b class='arrow'></b>");
    };
Run Code Online (Sandbox Code Playgroud)

这是我在Mootools的尝试

    var checkCurrentModule = function(){
            var injectModuleli = $$("li.current");
            var currentArrow = new Element("<b class='arrow'></b>");
            currentArrow.inject(injectModuleli);
        };     
Run Code Online (Sandbox Code Playgroud)

int*_*nta 5

提供一个单线程的解决方案,而不依赖于mootools - 更多:

$$('li.current').grab(new Element('b.arrow'), 'top');
Run Code Online (Sandbox Code Playgroud)

(我只是将其添加为评论,但我还没有被允许.)