зеркало из https://github.com/mozilla/bedrock.git
Merge pull request #94 from jpetto/bug-745257-privacy-checkbox
refactored footer-email-form.js
This commit is contained in:
Коммит
8d2fa4b97e
|
@ -1,8 +1,23 @@
|
|||
$(document).ready(function() {
|
||||
|
||||
$('#id_email,#footer_email_submit,#id_interest').focus(function () {
|
||||
$('#form-details').slideDown();
|
||||
function footer_email_form_show_details(trigger_click) {
|
||||
$('#form-details').slideDown('normal', function() {
|
||||
if (trigger_click) {
|
||||
$('#footer_email_submit').trigger('click');
|
||||
}
|
||||
});
|
||||
|
||||
$('#footer-email-form .form-details').slideDown();
|
||||
}
|
||||
|
||||
$('#id_email, #id_interest').focus(function () {
|
||||
footer_email_form_show_details(false);
|
||||
});
|
||||
|
||||
$('#footer_email_submit').click(function(e) {
|
||||
if (!$('#form-details').is(':visible')) {
|
||||
e.preventDefault();
|
||||
footer_email_form_show_details(true);
|
||||
}
|
||||
});
|
||||
|
||||
});
|
||||
|
|
Загрузка…
Ссылка в новой задаче