I have a problem with duplicate javascript functions. I am making widgets for websites.
the problem is when they add 2 widgets, they get duplicate javascript functions and the first function get all messed up.
is there a way to do something like this:
or
the problem is when they add 2 widgets, they get duplicate javascript functions and the first function get all messed up.
is there a way to do something like this:
Code:
var fname = "function_name";
function fname()
{
...
}
Code:
var fname = "_name";
function myfunction+fname()
{
...
}