My goal is to be able to call functions that are inside my JQuery plugin.
What is the correct syntax?
For example, this does not work:
<a href=# id=click_me>Click Me</a>
<script src=http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js></script>
<script>
(function($) {
$.fn.foo = function(options) {
do_stuff = function(){
console.log(hello world!); // works
do_other_stuff = function(){
alert(who are you?);
}
} // function
} // function
})(jQuery);
$(body).foo();
$(#click_me).click(function(){
$.fn.foo.do_stuff.do_other_stuff(); // doesn't work
});
</script>