title: How to stop document.ready from exection in jquery
body: <p>My query in the below code is --- I used a function slider in document.ready.Now my query is that when I click 'dot1' The function slider in the document.ready to stop execute until the function is called again. How to achieve this?Can anyone help me..... 
  Thanking you in advance.
  here is my code:</p>
  
  <p></p>
  
  <pre><code>    var imgValue;
      var value;
      var flag;
  
      function ClickEvent() {
          $('span[id^="dot"]').click(function (event) {
              event.stopPropagation();
              var Clickid = $(event.target)[0].id;
              $('.image1').css('display', 'none');
              $('.innerdiv').css('display', 'none');
  
              switch (Clickid) {
                  case 'dot1':
                      {
                          debugger;
                          SliderTimer = null;
                          clearInterval(SliderTimer);
                          flag = 0;
                          value = 1;
                          ImageLoad(value);
  
                          //setTimeout(SlideImage(), 150000);
                          //alert("dot1 Clicked");                         
                          break;
                      }
                  case 'dot2':
                      {
                          //alert("dot2 Clciked");
                          //setTimeout(SlideImage(), 5000);
                          value = 2;
                          ImageLoad(value);
                          //setTimeout(SlideImage(), 150000);
                          //alert("dot2 Clicked");
                          break;
                      }
                  case 'dot3':
                      {
                          //alert("dot3 Clicked");
                          //setTimeout(SlideImage(), 5000);
                          value = 3;
                          ImageLoad(value);
                          //setTimeout(SlideImage(), 150000);
                          //alert("dot3 Clicked");
                          break;
                      }
              }
          });
      }
  
      function ImageLoad(count) {
  
          $('* span').css('background-color', '#ccc');
          $('.Dots #dot' + count).delay(4500).css('background-color', "Black");
  
  
          $('.image #img' + count).show('fade', { direction: 'right' }, 1000);
  
          $('.image #indiv' + count).delay(1500).show('fade', 1000);
          $('.image #indiv' + count).delay(2500).hide('fade', { direction: 'left' }, 1000);
  
          $('.image #img' + count).delay(4500).hide('fade', { direction: 'left' }, 1000);
  
      }
  
      function LoadPage() {
          $('.image #img1').show('fade', 1000);
          $('* span').css('background-color', '#ccc');
          $('.Dots #dot1').css('background-color', 'Black');
      }
  
      $(document).ready(function Slider() {
  
          var sc = $('.image img').size();
  
          LoadPage();
          value = 1;
  
          setInterval(SliderTimer, 5000);
  
          ClickEvent();
  
      });
  
      var SliderTimer = function SliderImage() {
          var sc = $('.image img').size();
  
          ImageLoad(value);
  
          if (value == sc) {
             value = 1;
          }
          else {
             value += 1;
          }            
      }
  &lt;/script&gt;
  </code></pre>