开发者

Jquery script outliner / inspector

I am looking for an outline/inspector tool to simply list functions/objects in a jQuery script so I can jump around the script as needed. I am usi开发者_如何学Gong Eclipse with the Aptana plugin. If the file is a regular javascript file, the outline view lets me view functions in the file and I can quickly get to a specific function and see them listed nicely. However the outliner does not work with a jQuery file, so the only way I can navigate around is to use bookmarks, which gets to be unwieldy the larger the file becomes. To be clear, my question is not related to programming architecture, it's really just how to simply get around a jQuery file by use of an outliner or similar tool


With Aptana 3.0.4 (you should get this from the beta channel), the following does NOT work, that is, nothing appears in the JavaScript outline view:

$(document).ready(function() {
    // all your jquery code
    some_func = function (param1) {
        var v1 = 3;
        alert('hello!');
    }
}

However, the following equivalent code DOES work perfectly, i.e. you get a full Javascript outline:

thispage_readyfunc = function() {
    // all your jquery code
    some_func = function (param1) {
        var v1 = 3;
        alert('hello!');
    }
}

$(document).ready(thispage_readyfunc);

Also remember to do Command | Bundle development | Install Bundle | jQuery to get full jQuery intellisense.


I haven't found anything good yet either.

What I do now is to simply code plugins the old-fashioned way during development, so instead of a rather cumbersome anonymous function, just assign the plugin to the jQuery fn object directly:

http://twitter.com/#!/dave_stewart/status/9925855023202304


I ran into similar problem and would appreciate an answer for this as well.

BTW jquerywtp fails to install on Helios (for me), generation steps failed with exceptions.

The latest Apatana studio 3 doesn't seem to have that Code Assist check for jquery anymore at least I couldn't find it.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜