jQuery .html works but .load causes some weird results.
Posted
by J Harley
on Stack Overflow
See other posts from Stack Overflow
or by J Harley
Published on 2010-05-18T08:09:46Z
Indexed on
2010/05/18
8:10 UTC
Read the original article
Hit count: 324
jquery-ui
Hello,
I am currently working on some jQuery - it works perfectly when I uses .html but when I changed the method to .load and attempt to load a page in breaks the jquery on the rest of the page. Any ideas?
<script type="text/javascript">
$(document).ready(function() {
var $dialog = $('<div></div>')
.load ('ClientLogin.asp')
/* .html('
Username :
Password :
*/ .dialog({
width: 460,
modal: true,
autoOpen: false,
title: 'Please enter your account details to login:',
buttons: { "Login": function() { LoginForm.submit(); },
Cancel: function() { $(this).dialog('close'); } }
});
$('#opener').click(function() {
$dialog.dialog('open');
});
});
Any help is gratefully received. Many Thanks, Joel
© Stack Overflow or respective owner