title: JQuery sessionTimeOut Plugin: Uncaught TypeError: Cannot read property 'nodeType' of undefined jquery.min.js:4
body: <p>I am working on a simple sessionTimeOut Plugin from <strong>"<a href="https://github.com/ehynds/jquery-idle-timeout" rel="nofollow">https://github.com/ehynds/jquery-idle-timeout</a>"</strong>, strange issue is its working absolutely fine on one of my App BUT <strong>not</strong> on the <strong>Second</strong>, </p>
  
  <p>Below is the error I get on the second App when the page Loads.</p>
  
  <pre><code>Uncaught TypeError: Cannot read property 'nodeType' of undefined jquery.min.js:4
  &gt;   b.extend.acceptData jquery.min.js:4
  &gt;   P jquery.min.js:4
  &gt;   b.extend.data jquery.min.js:4
  &gt;   idleTimeout.init jquery.idletimeout.js:32
  &gt;   $.idleTimeout jquery.idletimeout.js:139
  &gt;   (anonymous function) Login:122
  </code></pre>
  
  <p>Here is the Code:</p>
  
  <pre><code>    &lt;script src="~/Scripts/Lib/Kendo/jquery.min.js"&gt;&lt;/script&gt;
  
      &lt;!--Calling the JQuery UI for dialog box usid in sessionTimeOut --&gt;
  &lt;link href="http://code.jquery.com/ui/1.10.3/themes/smoothness/jquery-ui.css" rel="stylesheet" type="text/css"&gt;
  &lt;script src="http://code.jquery.com/ui/1.10.3/jquery-ui.js"&gt;&lt;/script&gt;
  &lt;script src="~/Scripts/Custom/jquery.idletimeout.js"&gt;&lt;/script&gt;
  &lt;script src="~/Scripts/Custom/jquery.idletimer.js"&gt;&lt;/script&gt;
  
          &lt;script type="text/javascript"&gt;
          // setup the dialog
          $("#dialog").dialog({
              autoOpen: false,
              modal: true,
              width: 400,
              height: 210,
              closeOnEscape: false,
              draggable: false,
              resizable: false,
              buttons: {
                  'Yes, Keep Working': function () {
                      $(this).dialog('close');
                  },
                  'No, Logoff': function () {
                      // fire whatever the configured onTimeout callback is.
                      // using .call(this) keeps the default behavior of "this" being the warning
                      // element (the dialog in this case) inside the callback.
                      $.idleTimeout.options.onTimeout.call(this);
                  }
              }
          });
  
          // cache a reference to the countdown element so we don't have to query the DOM for it on each ping.
          var $countdown = $("#dialog-countdown");
  
          // start the idle timer plugin
          $.idleTimeout('#dialog', 'div.ui-dialog-buttonpane button:first', {
              idleAfter: 6,
              pollingInterval: 2,
              serverResponseEquals: 'OK',
              onTimeout: function () {
                  window.location = "/Home/Index/";
              },
              onIdle: function () {
                  $(this).dialog("open");
              },
              onCountdown: function (counter) {
                  $countdown.html(counter); // update the counter
              }
          });
  
  &lt;/script&gt;
  </code></pre>
  
  <p>Let me know if you need any other info!</p>
  
  <p>I am not sure what am I missing... Please suggest!</p>