I am loading a partial view into a main view using ajax but struggling to get the jquery to fire within the partial view.
Basically I am trying to allow a partial view to load that contains a button that allows me to open up a dialog window.
My partial view contains this small piece of js
<script type="text/javascript">
$(document).ready(function () {
alert('ready');
$('#edit-note').click(function () {
//$('#dialog').dialog('open');
alert("alert displayed from jquery");
});
});
</script>
However it is never fired.
What do I need to do to enable jquery to work from a dynamically loaded partial view?