title: JavaScript in HTML loaded using jQuery not executed
body: <p>I have seen other questions on this subject but none of the answers seem to work in my case.</p>
  
  <p>I have an ASP.NET MVC view (let's call it <strong>A</strong>) which loads another view (let's call it <strong>B</strong>) into a <code>&lt;div&gt;</code> using AJAX. View <strong>B</strong> has some JavaScript at the bottom which should be executed when it's loaded into view <strong>A</strong>. However, the script is not being executed regardless of whether I load view B using jQuery's <code>$.load()</code> or <code>$.ajax()</code>.</p>
  
  <p>I read somewhere that scripts are stripped off when additional selectors are applied to filter the loaded HTML, but I am <strong>not</strong> doing that. </p>
  
  <p>Besides, I can see the <code>&lt;script&gt;</code> tag and its contents in the page's source afterwards, so I know for sure nothing is stripped off. Curiously, though, not only is the JavaScript inside the <code>&lt;script&gt;</code> tag in view <strong>B</strong> not executed but none of the functions or variables defined there are visible to JavaScript in view <strong>A</strong> (i.e. they are all undefined).</p>
  
  <p>Any ideas, anybody?</p>