title: Uncaught Syntax error, unrecognized expression: [object Object]
body: <p>Working currenly on news scroller - see my live example here - <strong><a href="http://jsfiddle.net/MrTest/dwMfv/5/" rel="noreferrer">EXAMPLE</a></strong></p>
  
  <p>When I press next/prev arrow I'm getting an error log <code>Uncaught Syntax error, unrecognized expression: [object Object]</code></p>
  
  <p>Why is the problem? Where is the error in the syntax?</p>
  
  <p>jQuery Code:</p>
  
  <pre><code>        (function($) {
      /*!  Scroller
          ---------------------------------------------*/
          $.fn.Scroller = function() {
  
              //Set height
              $('.scroller').each(function() {
                  var height = 0;
                  $(this).children('div').each(function() {
  
                      if (height &lt; $(this).height()) {
                          height = $(this).height();
                      }
  
                  });
                  $(this).css("height", height + "px");
  
              });
  
              $('.scroller').each(function() {
  
                  var NextArrow = $(this).parent().find('.next');
                  var PrevArrow = $(this).parent().find('.prev');
  
  
                  // Set a timeout
                  var timeOut = setTimeout(nextNotice, 5000);
  
                  // pause on hover
                  $(this).hover(
  
                  function() {
                      clearTimeout(timeOut);
                  }, function() {
                      timeOut = setTimeout(nextNotice, 5000);
                  });
  
                  // Next notice function called on timeout or click
                  //set a flag that use to be an oberver to listen when the fadeIn done
                  var flag = true;
  
                  function nextNotice(event) {
  
                      var CurrentScrollerDiv = $(this).parent().find('.scroller');
  
                      if (!flag) {
                          return false;
                      }
                      clearTimeout(timeOut);
  
                      flag = false;
                      timeOut = setTimeout(nextNotice, 5000);
  
                      if ($(CurrentScrollerDiv + ' div:visible').is(CurrentScrollerDiv + '  div:last-child')) {
                          $(CurrentScrollerDiv + ' div:visible').fadeOut(300);
                          $(CurrentScrollerDiv + ' div:first-child').fadeIn("slow", function() {
                              flag = true;
                          });
                      } else {
                          $(CurrentScrollerDiv + ' div:visible').fadeOut(300).next('div').fadeIn("slow", function() {
                              flag = true;
                          });
                      }
                      return false;
                  }
  
                  $(NextArrow).click(nextNotice);
                  $(PrevArrow).click(function(event) {
  
                      var CurrentScrollerDiv = $(this).parent().find('.scroller');
  
                      if (flag) {
                          return false;
                      }
                      clearTimeout(timeOut);
  
                      flag = false;
                      timeOut = setTimeout(nextNotice, 5000);
  
                      if ($(CurrentScrollerDiv + ' div:visible').is(CurrentScrollerDiv + ' div:first-child')) {
                          $(CurrentScrollerDiv + ' div:visible').fadeOut(300);
                          $(CurrentScrollerDiv + ' div:last-child').fadeIn("slow", function() {
                              flag = true;
                          });
                      }
                      else {
                          $(CurrentScrollerDiv + ' div:visible').fadeOut(300).prev('div').fadeIn("slow", function() {
                              flag = true;
                          });
                      }
                      return false;
  
                  });
  
              });
  
          };
  
      })(jQuery);
  
  
      $(document).ready(function() {
          //Blog
          $('.itBlog &gt; div:first-child').show();
  
          //Scroller
          $('.scroller').Scroller();
  
      });
  </code></pre>