title: Calling Javascript Variable Created In Master Page in Yielded Content
body: <p>I am using Laravel 5 where I can make a master page (header, footer) and import every page's content in that master page. </p>
  
  <p>I have a dropdown in my header (master page) and in javascript, I have a variable connected to it - <code>var clickable = true;</code>.</p>
  
  <pre><code>//Master Blade
  @yield('content')
  
  &lt;script&gt;
     var clickable = true;    
  
     $('.dropdown).click(function() {
        clickable = false;
     })';
  &lt;/script&gt;
  </code></pre>
  
  <p>In my view (content), I have a function that I also want to change <code>clickable = true;</code></p>
  
  <pre><code>//View
     ('.contentElement').click(function() {
         clickable = true;
     });
  </code></pre>
  
  <p>However, it doesn't recognise it. Is there a way that I can achieve what I want to?</p>