title: royal slider does not work when jquery masonry loaded
body: <p>I am really beginner at jquery - only general understanding + background in other programming languages.</p>
  
  <p>I have royal slider wordpress plugin which works fine, until I load jquery masonry, with these settings:</p>
  
  <pre><code>jQuery(document).ready(function($){
      var container = document.querySelector('#portfolio-masonry');
      var msnry = new Masonry( container, {
          gutter: 30,
          itemSelector: '.portfolio-block',
          columnWidth: container.querySelector('.grid-sizer')
      });
  
  });
  </code></pre>
  
  <p>This somehow affects royalslider (no images are shown) with console error:</p>
  
  <pre><code>Uncaught TypeError: Cannot read property 'querySelector' of null
  </code></pre>
  
  <p>It seems like some kind of conflict with querySelector. How can I fix this.</p>
  
  <p>Website: WordPress (3.9 has masonry) &amp; <a href="http://dimsemenov.com/plugins/royal-slider/" rel="nofollow">royalslider</a></p>
  
  <p><em>Thanks in advance.</em></p>
  
  <p><strong>EDIT:</strong></p>
  
  <p>1) I enqueue my masonry &amp; settings in functions.php (wordpress)</p>
  
  <pre><code>wp_enqueue_script( 'redefined-reality-masonry', get_template_directory_uri() . '/js/masonry-settings.js', array('masonry'), '20140401', true );
  </code></pre>
  
  <p>2) I use very simple html markup:</p>
  
  <pre><code>&lt;div id="portfolio-masonry"&gt;
    &lt;div class="portfolio-block"&gt;&lt;/div&gt;
    &lt;div class="portfolio-block"&gt;&lt;/div&gt;
    ...
  &lt;/div&gt;
  </code></pre>
  
  <p>3) I use querySelector to direct masonry that i want to use specific width of column (and direct it to separate class ".grid-sizer". I did this so i could control <em>columnWidth</em> with use of  media queries for responsive purposes, since directly I cannot input that in js (only integer px, not even percentage! so its important in my design).</p>
  
  <p>4) Masonry works perfect, it is only used in few archive and custom pages of template. But the RoyalSlider plugin, the slider stops working. The pages containing slider do not have masonry, however I figure that in case in future i decide to have one with both... well i need a solution for this. </p>
  
  <p>I dont know what else should i add :D</p>