Makeup & Cosmetic Products | Neutrogena®


<![CDATA[ $(document).ready(function(){ $('.age-consent-yes, .age-consent-no').off('click'); $('.age-consent-yes, .age-consent-no').on('click',function(e){ e.preventDefault(); console.log($(this).attr('class')); var xx = $(this).parents('.consent-verbiage').first(); xx.find('input').removeAttr('checked'); $(this).find('input[name=age-consent]').attr('checked',true); $('.age-consent-yes, .age-consent-no').find('.checkmark').removeClass('exerror'); }); var targetFrm = '.newsletter-signup select.birth-date-month, .newsletter-signup select.birth-date-year, .mask-signup select.birth-date-month, .mask-signup select.birth-date-year, #email-form-backinstock select.birth-date-month, #email-form-backinstock select.birth-date-year, .account-create-page select#dwfrm_profile_customer_dob_month, .account-create-page select#dwfrm_profile_customer_dob_year'; $(targetFrm).off('change'); $(targetFrm).on('change', function(e) { var $parnt = $(this).parents('form').first(); var yrField = $parnt.find('select.birth-date-year'); if (yrField.length == 0) { yrField = $parnt.find('select#dwfrm_profile_customer_dob_year'); } var monField = $parnt.find('select.birth-date-month'); if (monField.length == 0) { monField = $parnt.find('select#dwfrm_profile_customer_dob_month'); } if (yrField.length && monField.length) { var yr_ = yrField.val() var mn_ = monField.val(); console.log('Month: ' + mn_); console.log('Year: ' + yr_); if (yr_ && mn_) { var frmDate = new Date( parseInt(yr_), parseInt(mn_) – 1); var crDate = new Date(); var age = crDate.getFullYear() – frmDate.getFullYear(); var m = crDate.getMonth() – frmDate.getMonth(); if (m

Source

Leave a Comment

Your email address will not be published. Required fields are marked *