- TypeError: $("#userSettingsBtn") is null, line:4

This commit is contained in:
Paulo Gustavo Veiga 2012-09-26 19:42:24 -03:00
parent f8fb56e49f
commit 14e9bf0e06

View File

@ -65,20 +65,23 @@
<script type="text/javascript">
$('#userSettingsBtn').click(
function (event) {
$('#settings-dialog-modal .modal-body').load("c/account/settings",
function () {
$('#settings-dialog-modal .btn-cancel').unbind('click').click(function () {
$('#settings-dialog-modal').modal("hide");
window.location.reload();
});
}
);
$('#settings-dialog-modal').modal();
event.preventDefault();
var userSettingsLink = $('#userSettingsBtn');
if (userSettingsLink) {
userSettingsLink.click(
function (event) {
$('#settings-dialog-modal .modal-body').load("c/account/settings",
function () {
$('#settings-dialog-modal .btn-cancel').unbind('click').click(function () {
$('#settings-dialog-modal').modal("hide");
window.location.reload();
});
}
);
$('#settings-dialog-modal').modal();
event.preventDefault();
});
});
}
</script>