title: Flickr API random div background
body: <p>I want to get a random photo with the flickr api with a tag of "landscape". The random photo link seems to be added programaticly in the html on inspect element in ChromeDevTools. But there is no photo. What am I doing wrong?</p>
  
  <pre><code>    $(document).ready(function() {
  
  
        $.getJSON("https://api.flickr.com/services/feeds/photos_public.gne?jsoncallback=?",
                 {
                    tags: "landscape",
                    format: "json"
                  },
  
                  //The callback function
                  function(data) {
  
                    //Get random photo from the api's items array
                      var randomPhoto = data.items[Math.floor(Math.random() * data.items.length)];  
  
  
                      $(".portret").css({
  
  
                        position: "relative",
                        height: "100vh",
                      //Use the randomPhoto's link
                        backgroundImage: "url("+randomPhoto.link+")",
                        backgroundPosition: "center",
                        backgroundRepeat: "no-repeat",
                        backgroundSize: "cover"
                      });
                  }
  
                 );
  
  
  
  
      });
  </code></pre>