Skip to content

Instantly share code, notes, and snippets.

@patrickhafner
Created July 31, 2012 14:11
Show Gist options
  • Save patrickhafner/1055ab3e4346d3881959 to your computer and use it in GitHub Desktop.
Save patrickhafner/1055ab3e4346d3881959 to your computer and use it in GitHub Desktop.
<script type="text/javascript">
$('.dblclick').click(function(event) {
$(document).bind('ajaxSend', function(e, request, options) {
$('div#page-edit-container').hide();
// won't work
$('form').livequery(function(){
$(this).dirtyForms();
});
});
$.ajax({
url : baseUrl + 'admin/pages/edit/'+$(this).attr('id'),
'type' : 'GET',
success : function(data) {
$('div#page-edit-container').html(data).fadeIn();
$('form').livequery(function(){
$(this).dirtyForms();
});
tinyMCEinit();
}
});
});
</script>
@snikch
Copy link

snikch commented Jul 31, 2012

The ajax call looks fine to me. What happens when you log the forms to the console, is there anything returned?

console.log($('form'))

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment