title: Jquery LayerSlider change options dynamically
body: <p>I'm still new to jQuery and I'm having a slight issue with LayerSlider. There is an option when calling the plugin that tells it what width the container for the text should be with 'layersContainer : 960'. </p>
  
  <p>What I'm trying to do is have the option set to 960px at almost all times, except for at one break point were I would want it at 768px. Currently my code is as follows:</p>
  
  <pre><code>function rContainer() {
      if ($("header").height() == 146) {
          $(this).data('layersContainer', '50');
      }
      else {
          $(this).data('layersContainer', '1030');
      }
  }
  
    function layerSlider() {
      $('#slider').layerSlider({
        layersContainer     : 960,   
        responsive          : false,
        responsiveUnder     : 0,    
        navButtons          : true,
        touchNav            : true,   
        keybNav             : true,  
        thumbnailNavigation : 'disabled',
        skin                : 'fullwidth',
        skinsPath           : 'layerslider/skins/',
      cbStart : rContainer(),
      });
    }
  </code></pre>
  
  <p>What I'm doing is checking to see when the header increases to 146px (when the nav stacks up for the first time) so I know when to change the 'layersContainer' option and bring the text container in a bit.</p>
  
  <p>The LayerSlider v5 documentation has the following under its API section:</p>
  
  <p>" The cbInit callback will receive the slider DOM element itself, while all of the other events will have the data object of the slider. The data object can be used to have access all of the settings that the working is working with, and it also make possible to override some of them on-the-fly. "</p>
  
  <p>With the following events: <a href="http://i.imgur.com/C0OP44v.png" rel="nofollow">LayerSlider v5 Events</a></p>
  
  <p>Any help would be much appreciated, and I'm sorry if I've left anything important out.</p>