I have a file called funcoes.js and another called events.js I need the script that is written inside events.js to run inside functions.js in another function, but in the order that it is placed inside it.
ex. The function inside funcoes.js
$.fn.test = function(dados) {
function antes(script){}
alert(dados);
function depois(script){}
}
script fired from events.js
$("#botao").test("teste")
antes(alert("antes");)
depois(alert("depois");)