Hi,
Let’s say I have script1.js and script2.js added on my page. Is the following acceptable use?
script1.js:
$('#form').submit(function() {
// do something
});
script2.js:
$('#form').submit(function() {
// do another thing
});
It seems to be working in my test, but wanted to ask others’ opinions too.
Use case: script1.js is a common script added to all pages, script2.js is unique to a single page.