title: Need to change event background and opacity in FullCalendar
body: <p>As a follow up to <a href="https://stackoverflow.com/questions/39653635/display-image-as-background-in-fullcalendar">Display image as background in fullcalendar</a>, I now have a fully working MySQL solution, but I cannot find a way to change the background if a custom column that I set in my database is not empty (picture), nor changing the same opacity according to the same condition.</p>
  
  <p>In my other question, I was able to change the background in dayRender and the opacity in eventRender:</p>
  
  <pre><code>dayRender: function (date, cell) {
      cell.css("background","url(https://www.mozilla.org/media/img/firefox/firefox-256.e2c1fc556816.jpg) no-repeat center");
      cell.css("background-size","contain")
  },
  eventRender: function(event, element) {
      $(element).css("opacity", "0.75");
  }
  </code></pre>
  
  <p>});</p>
  
  <p>Now my <strong>js</strong> code looks like this:</p>
  
  <pre><code>$(document).ready(function() {
      var date = new Date();
      var d = date.getDate();
      var m = date.getMonth();
      var y = date.getFullYear();
  
      var calendar = $('#calendar').fullCalendar({
          editable: true,
          header: {
              left: 'prev,next today',
              center: 'title',
              right: 'month'
          },
          events: "/events.php",
          dayRender: function (date, cell, view) { 
               cell.css("background","url(https://www.mozilla.org/media/img/firefox/firefox-256.e2c1fc556816.jpg) no-repeat center");
               cell.css("background-size","contain")
          },
          eventRender: function(event, element) {
  
          }
      });
  })
  </code></pre>
  
  <p>The <strong>PHP</strong> page to get the event data from the MySQL database is:</p>
  
  <pre><code>&lt;?php
      // List of events
      $json = array();
  
      // Query that retrieves events
      $requete = "SELECT * FROM evenement ORDER BY id";
  
      // connection to the database
      try {
          $bdd = new PDO('mysql:host=localhost;dbname=HIDDEN', 'HIDDEN', 'HIDDEN');
      } catch(Exception $e) {
          exit('Unable to connect to database.');
      }
      // Execute the query
      $resultat = $bdd-&gt;query($requete) or die(print_r($bdd-&gt;errorInfo()));
  
      // sending the encoded result to success page
      echo json_encode($resultat-&gt;fetchAll(PDO::FETCH_ASSOC));
  ?&gt;
  </code></pre>
  
  <p>I tried to use this in dayRender to change the background with no success so far:</p>
  
  <pre><code>var eventoObj = $("#calendar").fullCalendar( 'clientEvents')[0];
  alert(eventoObj.picture_url)
  </code></pre>
  
  <p>Can anyone help me out figuring this out?</p>
  
  <p>Thank you for your time and help.</p>