title: Javascript&Jquery why can't my animate() work?
body: <p>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:)</p>
  
  <p>Here is the error message:</p>
  
  <p>Uncaught TypeError: $(...).showDialog is not a function</p>
  
  <pre><code>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();
            });   
        });
    }
  </code></pre>