I assume that if you are trying to call:
el.foo()
Then el is a jQuery object, something like
var el = $("#smth"); el.foo();
In this case, you need to define 'foo' as:
$.fn.foo = function() { .... }
Otherwise, if you are just trying to call 'foo' from 'boo', then just name it without 'el':
var foo = function() { ... }; var boo = function() { ... foo(); }
Hope this helps.
ionoy source share