title: jQuery Syntax Error for custom wordpress script
body: <p>Can anyone see why I'm getting a syntax error on line 19 of this piece of code? To give some context: it's a small javascript to get an image to appear in a random place, at a relatively random size, at a random orientation on a wordpress page. I'm getting an error on the <code>});</code> just after the <code>background url...</code> The main code appears within the  <code>//* Required *//</code> notes. Thanks in advance</p>
  
  <pre><code>( function( $ ) {
  var body    = $( 'body' ),
      _window = $( window ),
      nav, button, menu;
  
  nav = $( '#site-navigation' );
  button = nav.find( '.menu-toggle' );
  menu = nav.find( '.nav-menu' );
  
  //*  Required *//
  
      (function makeDiv(){
          // vary size for fun
          var divsize = ((Math.random()*100) + 50).toFixed();
          $newdiv = $('&lt;div/&gt;').css({
              'width':divsize+'px',
              'height':divsize+'px',
              'background-url’:’/wp-content/themes/idealpress/images/popup.svg'
          });
  
          // make position sensitive to size and document's width
          var posx = (Math.random() * ($(document).width() - divsize)).toFixed();
          var posy = (Math.random() * ($(document).height() - divsize)).toFixed();    
          var rNum = (Math.random() * 360 ) + 1; 
  
          $newdiv.css({
              'position':'absolute',
              'left':posx+'px',
              'top':posy+'px',
              'display':'none',
              '-webkit-transform': 'rotate('+rNum+'deg)',
              '-moz-transform': 'rotate('+rNum+'deg)' 
          }).appendTo( 'body' ).fadeIn(100, function(){
            makeDiv(); 
          }); 
      })();
  //* Required *//
  
  
  } )( jQuery );
  </code></pre>