I've written some code, which is shown beneath. I couldn't figure out why hideDialog() can work, but showDialog() doesn't work.Can anybody tell me what wrong is with my code, or give me some information to search? Thanks:)
Here is the error message:
Uncaught TypeError: $(...).showDialog is not a function
function showDialog(){
      this.animate({
          top:50
      },{ 
          duration:400,
          effect:'slide',
          easing:'easeOutBack'
      }); 
  }
  function hideDialog(){
      this.animate({
          top:-200
      },{ 
          duration:400,
          effect:'slide',
          easing:'easeInBack'
      });
  }
  function initSetting(){
      $('.form-control').change(function(){
          $('#myAlertDialog').showDialog();
          $('#myAlertDialog').find('btnOk').on('click',function(){
              $('#myAlertDialog').hideDialog();
          });   
      });
  }
 
     
     
     
    