Reputation: 9293
examples:
$('.title').on('click', function(){
do_something();
}
$('.title').on('contextmenu', function(){
do_something();
}
I have a lot of such functions in a .js
file.
Each time I need to edit the function (Notepad++
) I need to press Ctrl F
and search for title
then press Enter
several times while it is not found.
Because title
and click
and contextmenu
are used a lot inside other functions.
Supprised but there are no names of jquery functions in the function list. There is only a word - function
- totally useless.
I tried Atom
and Sublime
- the same situation. Pure js functions are there, but jquery functions are missing.
So what is your practice? How do you find desired jq
function inside a large
js
file?
Is there an editor, for Windows, having the names of jq
functions on the sidebar?
If not - a potential solution could be a simple plugin for npp
which should find the above function directly if title click
or title context
is typed into the search box.
Is it possible to create that plugin in javascript? If yes - please some help - where to start.
The third solution is a browser-based code editor, but that's probably too complicated fur such a minor task - have a function in a function list.
Any help?
Upvotes: 1
Views: 56
Reputation: 93
Type comments above your functions and then search for those comments it will help you allot.
Upvotes: 1