Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //************
- // Чекбокс в Feedback
- // **********
- $(".field-checkbox").each(function() {
- $(this).click(function() {
- if ( $(this).find("input").prop('checked') === false) {
- $(this).find(".field-checkbox__input-fake").addClass("field-checkbox__input-fake--checked");
- $(this).find("input").prop('checked', true);
- } else {
- $(this).find(".field-checkbox__input-fake").removeClass("field-checkbox__input-fake--checked");
- $(this).find("input").prop('checked', false);
- }
- });
- });
- //************
- // Рамка для чекбокса в CF7 при плохой отправке
- // **********
- $('.wpcf7').on('wpcf7mailsent', function(){
- // $.fancybox.close();
- // $.fancybox.open({
- // src : '#done',
- // type : 'inline',
- // toolbar : false
- // });
- var checkbox_label = $(this).find(".field-checkbox");
- jQuery.each(checkbox_label, function() {
- $(this).removeClass("checkbox__checked");
- $(this).removeClass("checkbox__not-valid");
- });
- });
- $('.wpcf7').on('wpcf7invalid', function() {
- var checkbox_label = $(this).find(".field-checkbox");
- jQuery.each(checkbox_label, function() {
- if ($(this).children().children(".wpcf7-not-valid").length == true) {
- $(this).addClass("checkbox__not-valid");
- } else {
- $(this).removeClass("checkbox__not-valid");
- }
- })
- });
Add Comment
Please, Sign In to add comment