Dialog is not showing

Dialog is not showing

I want to show a response in a dialog but it is not working.
  1.  <script type="text/javascript">
             $(document).ready(function () {
                 $('#btn1').click(myFunction);
             });
             function myFunction() {
                 var strSearch = $('#txt1').val();
                 var url = '@Url.Action("GetPassage", "Home")';
                 $.get(url, { 'strSearch': strSearch }, function (data) {
                     $('#req1').empty().html(data).dialog('open');
                 })
             }
             $("#req1").dialog({
                 autoOpen: false,
                 resizable: false,
                 position: 'center',
                 stack: true,
                 height: 'auto',
                 width: 'auto',
                 modal: true
             });
     </script>



















And html code is
  1. <div id="req1">
        <form>
            <input id="txt1" type="text" name="txt1" />
        </form>
    </div>
    <div id="btn1">Send</div>
    <div id="seperator">Result</div>
    <div id="res1"></div>






By the way, I don't know why dialog is not working after $('selector'). with the intellisense in Visual Studio 2012.

Thanks