You can call the function created in another js file from the file you are working in. So for this firstly you need to add the external js file into the html document as-
<html>
<head>
<script type="text/javascript" src='path/to/external/js'></script>
</head>
<body>
........
The function defined in the external javascript file -
$.fn.yourFunctionName = function(){
alert('function called succesfully for - ' + $(this).html() );
}
To call this function in your current file, just call the function as -
......
<script type="text/javascript">
$(function(){
$('#element').yourFunctionName();
});
</script>
If you want to pass the parameters to the function, then define the function as-
$.fn.functionWithParameters = function(parameter1, parameter2){
alert('Parameters passed are - ' + parameter1 + ' , ' + parameter2);
}
And call this function in your current file as -
$('#element').functionWithParameters('some parameter', 'another parameter');