title: jQuery - Syntax error missing } after function body
body: <p>Sorry, I'm not a programmer. I'm building a personal WordPress site for myself, I had to edit the php file and I came across this problem. Please somebody help me....</p>
  
  <p><strong>ANSWER</strong> Thank you everyone:D it's working, sometimes I'm amazed at how stupid I am:P</p>
  
  <p>Firebug:</p>
  
  <pre><code>SyntaxError: missing } after function body
  [Break On This Error]   
  
  ...){           var $container = $('#portfolio');               //load with opacity if fade i...
  </code></pre>
  
  <p>Code:</p>
  
  <pre><code>jQuery(document).ready(function ($) {
    var $container = $('#portfolio');
    //load with opacity if fade in is off
    if ($('#portfolio').attr('data-fade') != 1) {
      $('#portfolio.portfolio-items .col.span_&lt;?php echo $span_num; ?&gt;').css('opacity', 1);
    }
    //else show the loading gif
    else {
      $('.container.main-content').before('&lt;span id="portfolio-loading"&gt;&lt;span&gt;');
    }
    $(window).load(function () {
      // initialize isotope
      $container.isotope({
        itemSelector: '.element',
        filter: '*',
        masonry: {
          columnWidth: $container.width() / &lt;? php echo $cols; ?&gt;
        }
      });
      //fade in
      if ($('#portfolio').attr('data-fade') == 1) {
        //fadeout the loading animation
        $('#portfolio-loading').stop(true, true).fadeOut(300);
        //fadeIn items one by one
        $('#portfolio.portfolio-items .col.span_&lt;?php echo $span_num; ?&gt;').css('opacity', 0);
        $('#portfolio.portfolio-items .col.span_&lt;?php echo $span_num; ?&gt;').each(function (i) {
          $(this).delay(i * 150).animate({
            'opacity': 1
          }, 350);
        });
      }
    });
  </code></pre>