I have this button in html:
<button id="btnCell" onclick="CellClicked(1, 1, false)"></button>
And this Javascript:
 $(function() {       
    $( "#txtSearch" ).autocomplete({
      source: function( request, response ) {
         //some logic
      },
      minLength: 2,
      select: function( event, ui ) {
        log( "Selected: " + ui.item.value + " aka " + ui.item.id );
        },
    });
  function CellClicked(x, y, selXml) {          
        //some logic
    }        
});
Whenever I click button above I get this error:
Uncaught ReferenceError: CellClicked is not defined
It happens because the method encapsulated in class, I know that I can drag the method out of the class and it will work.
But I want the method to be encapsulated those I ask the question how can I call the function when method CellClicked encapsulated?
 
    