title: jquery function not firing at all
body: <p>Real Dumb question.  I figured I would have gotten this straight by now, but I am obviously missing something.  I want my function to fire as soon as the page loads to check the value of a variable and make a button appear or dissapear based on that value.  But the function I wrote never gets called.  I place the function inside a $.Load() and $(document).ready jquery call.  How can I get this function to fire?</p>
  
  <pre><code> $(document).ready(function () {
          debugger;        
          (function () {           
          debugger;
          var $b = '&lt;%=toggle %&gt;';
          var buttonTog = $("#test1");
          var buttonTog1 = $("#Submit1");
          if($b=="1")
          {
              debugger;
              buttonTog1.css({
                  display: 'block'
              })
              buttonTog.css({
                  display: 'none'
              });
          }
          else if($b=="0")
          {
              debugger;
              buttonTog1.css({
                  display: 'none'
              })
              buttonTog.css({
                  display: 'block'
              });
             }            
         });
         ...
      });
  </code></pre>
  
  <p>As you can see, I have multiple debugger statements in there that just don't get hit...  When I hit $(document).ready and I get into the first debugger statement, It simply doesn't touch the next function?  I don't get it?  It goes right over it?  Can you not call a function inside the .ready(function())?  Definitly need to get some research done.</p>