title: creating the alert() method without the display - javascript
body: <p>is there a way that I can duplicate what the alert() function does, without the popup?? This might seem mad but there is good cause for this.</p>
  
  <p><strong>EDIT</strong></p>
  
  <p>Here is my code:</p>
  
  <pre><code>var navActive;
  var pageID;
  var maxNav;
  var popWidth = $(window).width();
  var popHeight = $(window).height();
  
  function thread_start(callback) {
  
     setTimeout(callback, 1);
     return true;
  }
  
  (function($){
  
  $.fn.foneySlide = function ( options ) {
  
      $(window).resize(function(){
          popWidth = $(window).width() - 40;
          popHeight = $(window).height() - 40;
      })
  
      opt = $.extend ({ popOnTransition : true }, options);
  
      // firstly give all navigation items a position reference for continous slide
      $('[data-role=page]').each(function(i){
          $(this).attr('navpos', i );
          if( typeof $('[data-role=page]')[i+1] == 'undefined' ) {
              maxNav = i;
          }
      });
  
      // get the current active page and the default navigation position
      pageID = $('.ui-page-active').attr('id');
      navActive = $('#' + pageID).attr('navpos');
  
      // change page on swipe left       
      $('body').bind('swipeleft', function(e){
          if( navActive == maxNav ) {
              navActive = 0;
              alert();
              thread_start("$.mobile.changePage($('[navpos=0]'), 'slide', false, true)");
          }else{
              navActive = Number(navActive + 1);
              alert();
              thread_start("$.mobile.changePage($('[navpos=' + navActive  + ']'), 'slide', false, true)");
          }
      });
  
      // change page on swipe right                
      $('body').bind('swiperight', function(e){
          if( navActive == 0 ) {
              navActive = maxNav;
              alert();
              thread_start("$.mobile.changePage($('[navpos=' + navActive + ']'), 'slide', true, true)");
          }else{
              navActive = Number(navActive - 1);
              alert();
              thread_start("$.mobile.changePage($('[navpos=' + navActive  + ']'), 'slide', true, true)");
          }
      }); 
  }   
  </code></pre>
  
  <p>})(jQuery);</p>
  
  <p>remove the alerts and it starts to freeze.</p>