Calling local function with Jquery
- by Bug Magnet
I have a JQuery function as followss:
(function($){
$.fn.autoSuggest = function(data, options) {
function add_selected_item(data, num){
(function($){
$.fn.autoSuggest = function(data, options) {
alert(data);
}
});
}
});
If I wanted to call the local add_selected_item() function from outside this function, how would I do it?
I've tried doing:
$.autoSuggest.add_selected_item(data, opt);
But am getting an $.autoSuggest is undefined.
Still learning the ropes with JQUery. I am not sure exactly how this can be accomplished, if at all.
Thanks!