Build React Apps and Win $2000, $750, $250! – Enter the ReExt Contest

')); }); $("#menu-secondary-navigation-menu .rdp-gcs-search-form.search-form").each(function () { var $searchForm = $(this), $txtSearchTerm = $searchForm.find('.rdp-gcs-search-term'), $searchResults = $('body.search_results'), $searchResultsTitle = $('.p_title'), $searchResultsContent = $('.p_content'), $searchResultsPagination = $('.paginate_div'); function validateSearch() { if ($txtSearchTerm.val() !== '') { $searchForm.find('.rdp-gcs-search-button').attr("disabled", false); } else { $searchForm.find('.rdp-gcs-search-button').attr("disabled", true); } } $searchResults.find('.entry-content').first().wrapInner('
'); $searchResultsTitle.addClass('double').find('a').addClass('color-navy').append($('')); $searchResultsContent.wrapInner('

'); $searchResultsPagination.addClass('pagination archive-pagination').find('wdm_ul').addClass('page-numbers'); $searchForm.find('.rdp-gcs-search-button, .rdp-gcs-search-term').attr("tabindex", -1); $searchForm.find('#cser').attr("value", ""); $searchForm.find('.rdp-gcs-search-term').attr("placeholder", "?") .on("keydown", function (ev) { ev.stopImmediatePropagation(); if (ev.which == 13) { if ($('#' + this.form.id + ' #cseid').val() == 0) { handle_search_and_highlight($txtSearchTerm.val()); } else if ($txtSearchTerm.val() !== '') { $("body").unhighlight(); $('#' + this.form.id + ' #s').val(''); $('input[name=csep]').val(1); this.form.submit(); } } else { validateSearch(); } }) .on("keyup", function (ev) { validateSearch(); }); $searchForm .find('.rdp-gcs-search-button') .on('click', function (ev) { ev.stopImmediatePropagation(); if ($('#' + this.form.id + ' #cseid').val() == 0) { handle_search_and_highlight($txtSearchTerm.val()); } else if ($txtSearchTerm.val() !== '') { $("body").unhighlight(); $('#' + this.form.id + ' #s').val(''); $('input[name=csep]').val(1); this.form.submit(); } }); $searchForm .on('mousemove', function (ev) { validateSearch(); }) .on('focusin', function (ev) { $('#menu-secondary-navigation-menu').addClass('search-active').find('.search').addClass('active'); $('#menu-secondary-navigation-menu > li a').fadeOut(); validateSearch(); }) .on('focusout', function (ev) { $('#menu-secondary-navigation-menu > li a').fadeIn(function () { $('#menu-secondary-navigation-menu').removeClass('search-active').find('.search').removeClass('active'); }); }); $('#SearchMenu') .on('click', function (ev) { ev.stopImmediatePropagation(); $('#menu-secondary-navigation-menu > .search > .search-form').find('.rdp-gcs-search-term')[0].focus(); }); }); })(jQuery); (function ($) { $('#menu-item-26717,#menu-item-36342').hover( function () { $('#menu-item-36336').addClass('hide'); }, function () { $('#menu-item-36336').removeClass('hide'); } ); $(document).on('touchstart click', '.open-nav', function (e) { if ($(e.target).is('#hamburger') || $(e.target).parents('nav.nav-primary').length) { return true; } else { $(this).removeClass('open-nav'); } }); if (typeof Cookies !== 'undefined') { $('body').toggleClass('can-checkout', Number(Cookies.get('woocommerce_items_in_cart')) > 0); } })(jQuery); jQuery(document).ready(function ($) { var $t = $('.blog .content-sidebar-wrap .sidebar-primary #hybrid-categories-6'), $l = $('ul', $t).hide(), st = $l.slideToggle.bind($l); $t.off().on('click', 'h4', st); var r = 4, mrktoWait; (mrktoWait = function () { setTimeout(function () { var $mko = $('.marketo-fat-form'), hashLink = $('[href="' + location.hash + '"]').first(); if ($mko.length) $mko.find('[style]').removeAttr('style').end().find('style').detach().end().fadeIn(), hashLink.length && hashLink.click(); else if (--r) mrktoWait(); }, 2000); })(); }); (function ($) { $('.slide').attr('style', 'display:none;'); $('.pagination').addClass('entry').find('ul').addClass('page-numbers').find('li a').addClass('small flat loose page-numbers button color-light'); $('.pagination .active').removeClass('active').find('a').addClass('current'); $('link[href*="xmlrpc.php"]').detach(); $('body').removeClass('woocommerce'); $('input.submit').addClass('color-navy'); $('.widget .blog-subscription input[type="submit"]').addClass('small closer').parent().find('[name="subscribe"]').addClass('color-orange').parent().find('[name="unsubscribe"]').addClass('color-grey').parent().find('br,label').detach(); $('.woocommerce-error li > small').on('click', function () { $(this).toggleClass('closed open') }); $('.newsletter').click(function () { $('.newsletter').attr('href', '/newsletter/?email=' + $('.newsletterEmail').val()); }); })(jQuery); jQuery(document).ready(function ($) { //Add Idera Menu $(".title-area").prepend("
Discover Idera, Inc.
IDERA, Inc.
About Idera, Inc.Developer ToolsDatabase ToolsDevOps Tools
 
US: 1 (800) 212-2802
"); }); //Section Scoller (function ($) { var $advBTN = $('.sncSectionScrollBTN').removeClass('sncSectionScrollBTN').wrap('').parent(), productPageAnchors = ['Overview', 'Tools', 'Example', 'Resources', 'GetStarted', 'Top'], advanceAnchor = function () { var nextIndex = productPageAnchors.indexOf($advBTN.data('nextAnchorIndex')) + 1, nextAnchor = productPageAnchors[nextIndex >= productPageAnchors.length && !(nextIndex = 0), nextIndex], rotateDeg = 'rotate(' + (productPageAnchors.indexOf(nextAnchor) + 1 >= productPageAnchors.length ? '-180' : '0') + 'deg)'; setTimeout(function () { $advBTN.attr('href', '#' + nextAnchor).attr('title', nextAnchor); }, 60); $advBTN.data('nextAnchorIndex', nextAnchor).css('transform', rotateDeg); return !0; }; $advBTN.on('click', advanceAnchor); advanceAnchor(); })(jQuery); jQuery(document).ready(function($) { $(".footer-widgets-6").append("
Leader winter
"); $(".sncFooterWrap .wrap").append("
StackoverflowDiscordGithubYoutube
"); }); jQuery(document).ready(function () { const countries = { 'AF':{ "name": "Afghanistan", "phoneCode": "+93" }, 'AX':{ "name": "land Islands", "phoneCode": "+358" }, 'AL':{ "name": "Albania", "phoneCode": "+355" }, 'DZ':{ "name": "Algeria", "phoneCode": "+213" }, 'AS':{ "name": "American Samoa", "phoneCode": "+1" }, 'AD':{ "name": "AndorrA", "phoneCode": "+376" }, 'AO':{ "name": "Angola", "phoneCode": "+244" }, 'AI':{ "name": "Anguilla", "phoneCode": "+1" }, 'AQ':{ "name": "Antarctica", "phoneCode": "+672" }, 'AG':{ "name": "Antigua and Barbuda", "phoneCode": "+1" }, 'AR':{ "name": "Argentina", "phoneCode": "+54" }, 'AM':{ "name": "Armenia", "phoneCode": "+374" }, 'AW':{ "name": "Aruba", "phoneCode": "+297" }, 'AU':{ "name": "Australia", "phoneCode": "+61" }, 'AT':{ "name": "Austria", "phoneCode": "+43" }, 'AZ':{ "name": "Azerbaijan", "phoneCode": "+994" }, 'BS':{ "name": "Bahamas", "phoneCode": "+1" }, 'BH':{ "name": "Bahrain", "phoneCode": "+973" }, 'BD':{ "name": "Bangladesh", "phoneCode": "+880" }, 'BB':{ "name": "Barbados", "phoneCode": "+1" }, 'BY':{ "name": "Belarus", "phoneCode": "+375" }, 'BE':{ "name": "Belgium", "phoneCode": "+32" }, 'BZ':{ "name": "Belize", "phoneCode": "+501" }, 'BJ':{ "name": "Benin", "phoneCode": "+229" }, 'BM':{ "name": "Bermuda", "phoneCode": "+1" }, 'BT':{ "name": "Bhutan", "phoneCode": "+975" }, 'BO':{ "name": "Bolivia", "phoneCode": "+591" }, 'BA':{ "name": "Bosnia and Herzegovina", "phoneCode": "+387" }, 'BW':{ "name": "Botswana", "phoneCode": "+267" }, 'BV':{ "name": "Bouvet Island", "phoneCode": "+47" }, 'BR':{ "name": "Brazil", "phoneCode": "+55" }, 'IO':{ "name": "British Indian Ocean Territory", "phoneCode": "+246" }, 'BN':{ "name": "Brunei Darussalam", "phoneCode": "+673" }, 'BG':{ "name": "Bulgaria", "phoneCode": "+359" }, 'BF':{ "name": "Burkina Faso", "phoneCode": "+226" }, 'BI':{ "name": "Burundi", "phoneCode": "+257" }, 'KH':{ "name": "Cambodia", "phoneCode": "+855" }, 'CM':{ "name": "Cameroon", "phoneCode": "+237" }, 'CA':{ "name": "Canada", "phoneCode": "+1" }, 'CV':{ "name": "Cape Verde", "phoneCode": "+238" }, 'KY':{ "name": "Cayman Islands", "phoneCode": "+1" }, 'CF':{ "name": "Central African Republic", "phoneCode": "+236" }, 'TD':{ "name": "Chad", "phoneCode": "+235" }, 'CL':{ "name": "Chile", "phoneCode": "+56" }, 'CN':{ "name": "China", "phoneCode": "+86" }, 'CX':{ "name": "Christmas Island", "phoneCode": "+61" }, 'CC':{ "name": "Cocos (Keeling) Islands", "phoneCode": "+61" }, 'CO':{ "name": "Colombia", "phoneCode": "+57" }, 'KM':{ "name": "Comoros", "phoneCode": "+269" }, 'CG':{ "name": "Congo", "phoneCode": "+242" }, 'CD':{ "name": "Congo, The Democratic Republic of the", "phoneCode": "+243" }, 'CK':{ "name": "Cook Islands", "phoneCode": "+682" }, 'CR':{ "name": "Costa Rica", "phoneCode": "+506" }, 'CI':{ "name": "Cote D'Ivoire", "phoneCode": "+225" }, 'HR':{ "name": "Croatia", "phoneCode": "+385" }, 'CU':{ "name": "Cuba", "phoneCode": "+53" }, 'CY':{ "name": "Cyprus", "phoneCode": "+357" }, 'CZ':{ "name": "Czech Republic", "phoneCode": "+420" }, 'DK':{ "name": "Denmark", "phoneCode": "+45" }, 'DJ':{ "name": "Djibouti", "phoneCode": "+253" }, 'DM':{ "name": "Dominica", "phoneCode": "+1" }, 'DO':{ "name": "Dominican Republic", "phoneCode": "+1" }, 'EC':{ "name": "Ecuador", "phoneCode": "+593" }, 'EG':{ "name": "Egypt", "phoneCode": "+20" }, 'SV':{ "name": "El Salvador", "phoneCode": "+503" }, 'GQ':{ "name": "Equatorial Guinea", "phoneCode": "+240" }, 'ER':{ "name": "Eritrea", "phoneCode": "+291" }, 'EE':{ "name": "Estonia", "phoneCode": "+372" }, 'ET':{ "name": "Ethiopia", "phoneCode": "+251" }, 'FK':{ "name": "Falkland Islands (Malvinas)", "phoneCode": "+500" }, 'FO':{ "name": "Faroe Islands", "phoneCode": "+298" }, 'FJ':{ "name": "Fiji", "phoneCode": "+679" }, 'FI':{ "name": "Finland", "phoneCode": "+358" }, 'FR':{ "name": "France", "phoneCode": "+33" }, 'GF':{ "name": "French Guiana", "phoneCode": "+594" }, 'PF':{ "name": "French Polynesia", "phoneCode": "+689" }, 'TF':{ "name": "French Southern Territories", "phoneCode": "+262" }, 'GA':{ "name": "Gabon", "phoneCode": "+241" }, 'GM':{ "name": "Gambia", "phoneCode": "+220" }, 'GE':{ "name": "Georgia", "phoneCode": "+995" }, 'DE':{ "name": "Germany", "phoneCode": "+49" }, 'GH':{ "name": "Ghana", "phoneCode": "+233" }, 'GI':{ "name": "Gibraltar", "phoneCode": "+350" }, 'GR':{ "name": "Greece", "phoneCode": "+30" }, 'GL':{ "name": "Greenland", "phoneCode": "+299" }, 'GD':{ "name": "Grenada", "phoneCode": "+1" }, 'GP':{ "name": "Guadeloupe", "phoneCode": "+590" }, 'GU':{ "name": "Guam", "phoneCode": "+1" }, 'GT':{ "name": "Guatemala", "phoneCode": "+502" }, 'GG':{ "name": "Guernsey", "phoneCode": "+44" }, 'GN':{ "name": "Guinea", "phoneCode": "+224" }, 'GW':{ "name": "Guinea-Bissau", "phoneCode": "+245" }, 'GY':{ "name": "Guyana", "phoneCode": "+592" }, 'HT':{ "name": "Haiti", "phoneCode": "+509" }, 'HM':{ "name": "Heard Island and Mcdonald Islands", "phoneCode": "+672" }, 'VA':{ "name": "Holy See (Vatican City State)", "phoneCode": "+379" }, 'HN':{ "name": "Honduras", "phoneCode": "+504" }, 'HK':{ "name": "Hong Kong", "phoneCode": "+852" }, 'HU':{ "name": "Hungary", "phoneCode": "+36" }, 'IS':{ "name": "Iceland", "phoneCode": "+354" }, 'IN':{ "name": "India", "phoneCode": "+91" }, 'ID':{ "name": "Indonesia", "phoneCode": "+62" }, 'IR':{ "name": "Iran, Islamic Republic Of", "phoneCode": "+98" }, 'IQ':{ "name": "Iraq", "phoneCode": "+964" }, 'IE':{ "name": "Ireland", "phoneCode": "+353" }, 'IM':{ "name": "Isle of Man", "phoneCode": "+44" }, 'IL':{ "name": "Israel", "phoneCode": "+972" }, 'IT':{ "name": "Italy", "phoneCode": "+39" }, 'JM':{ "name": "Jamaica", "phoneCode": "+1" }, 'JP':{ "name": "Japan", "phoneCode": "+81" }, 'JE':{ "name": "Jersey", "phoneCode": "+44" }, 'JO':{ "name": "Jordan", "phoneCode": "+962" }, 'KZ':{ "name": "Kazakhstan", "phoneCode": "+7" }, 'KE':{ "name": "Kenya", "phoneCode": "+254" }, 'KI':{ "name": "Kiribati", "phoneCode": "+686" }, 'KP':{ "name": "Korea, Democratic People'S Republic of", "phoneCode": "+850" }, 'KR':{ "name": "Korea, Republic of", "phoneCode": "+82" }, 'KW':{ "name": "Kuwait", "phoneCode": "+965" }, 'KG':{ "name": "Kyrgyzstan", "phoneCode": "+996" }, 'LA':{ "name": "Lao People'S Democratic Republic", "phoneCode": "+856" }, 'LV':{ "name": "Latvia", "phoneCode": "+371" }, 'LB':{ "name": "Lebanon", "phoneCode": "+961" }, 'LS':{ "name": "Lesotho", "phoneCode": "+266" }, 'LR':{ "name": "Liberia", "phoneCode": "+231" }, 'LY':{ "name": "Libyan Arab Jamahiriya", "phoneCode": "+218" }, 'LI':{ "name": "Liechtenstein", "phoneCode": "+423" }, 'LT':{ "name": "Lithuania", "phoneCode": "+370" }, 'LU':{ "name": "Luxembourg", "phoneCode": "+352" }, 'MO':{ "name": "Macao", "phoneCode": "+853" }, 'MK':{ "name": "Macedonia, The Former Yugoslav Republic of", "phoneCode": "+389" }, 'MG':{ "name": "Madagascar", "phoneCode": "+261" }, 'MW':{ "name": "Malawi", "phoneCode": "+265" }, 'MY':{ "name": "Malaysia", "phoneCode": "+60" }, 'MV':{ "name": "Maldives", "phoneCode": "+960" }, 'ML':{ "name": "Mali", "phoneCode": "+223" }, 'MT':{ "name": "Malta", "phoneCode": "+356" }, 'MH':{ "name": "Marshall Islands", "phoneCode": "+692" }, 'MQ':{ "name": "Martinique", "phoneCode": "+596" }, 'MR':{ "name": "Mauritania", "phoneCode": "+222" }, 'MU':{ "name": "Mauritius", "phoneCode": "+230" }, 'YT':{ "name": "Mayotte", "phoneCode": "+262" }, 'MX':{ "name": "Mexico", "phoneCode": "+52" }, 'FM':{ "name": "Micronesia, Federated States of", "phoneCode": "+691" }, 'MD':{ "name": "Moldova, Republic of", "phoneCode": "+373" }, 'MC':{ "name": "Monaco", "phoneCode": "+377" }, 'MN':{ "name": "Mongolia", "phoneCode": "+976" }, 'MS':{ "name": "Montserrat", "phoneCode": "+1" }, 'MA':{ "name": "Morocco", "phoneCode": "+212" }, 'MZ':{ "name": "Mozambique", "phoneCode": "+258" }, 'MM':{ "name": "Myanmar", "phoneCode": "+95" }, 'NA':{ "name": "Namibia", "phoneCode": "+264" }, 'NR':{ "name": "Nauru", "phoneCode": "+674" }, 'NP':{ "name": "Nepal", "phoneCode": "+977" }, 'NL':{ "name": "Netherlands", "phoneCode": "+31" }, 'AN':{ "name": "Netherlands Antilles", "phoneCode": "+599" }, 'NC':{ "name": "New Caledonia", "phoneCode": "+687" }, 'NZ':{ "name": "New Zealand", "phoneCode": "+64" }, 'NI':{ "name": "Nicaragua", "phoneCode": "+505" }, 'NE':{ "name": "Niger", "phoneCode": "+227" }, 'NG':{ "name": "Nigeria", "phoneCode": "+234" }, 'NU':{ "name": "Niue", "phoneCode": "+683" }, 'NF':{ "name": "Norfolk Island", "phoneCode": "+672" }, 'MP':{ "name": "Northern Mariana Islands", "phoneCode": "+1" }, 'NO':{ "name": "Norway", "phoneCode": "+47" }, 'OM':{ "name": "Oman", "phoneCode": "+968" }, 'PK':{ "name": "Pakistan", "phoneCode": "+92" }, 'PW':{ "name": "Palau", "phoneCode": "+680" }, 'PS':{ "name": "Palestinian Territory, Occupied", "phoneCode": "+970" }, 'PA':{ "name": "Panama", "phoneCode": "+507" }, 'PG':{ "name": "Papua New Guinea", "phoneCode": "+675" }, 'PY':{ "name": "Paraguay", "phoneCode": "+595" }, 'PE':{ "name": "Peru", "phoneCode": "+51" }, 'PH':{ "name": "Philippines", "phoneCode": "+63" }, 'PN':{ "name": "Pitcairn", "phoneCode": "+870" }, 'PL':{ "name": "Poland", "phoneCode": "+48" }, 'PT':{ "name": "Portugal", "phoneCode": "+351" }, 'PR':{ "name": "Puerto Rico", "phoneCode": "+1" }, 'QA':{ "name": "Qatar", "phoneCode": "+974" }, 'RE':{ "name": "Reunion", "phoneCode": "+262" }, 'RO':{ "name": "Romania", "phoneCode": "+40" }, 'RU':{ "name": "Russian Federation", "phoneCode": "+7" }, 'RW':{ "name": "RWANDA", "phoneCode": "+250" }, 'SH':{ "name": "Saint Helena", "phoneCode": "+290" }, 'KN':{ "name": "Saint Kitts and Nevis", "phoneCode": "+1" }, 'LC':{ "name": "Saint Lucia", "phoneCode": "+1" }, 'PM':{ "name": "Saint Pierre and Miquelon", "phoneCode": "+508" }, 'VC':{ "name": "Saint Vincent and the Grenadines", "phoneCode": "+1" }, 'WS':{ "name": "Samoa", "phoneCode": "+685" }, 'SM':{ "name": "San Marino", "phoneCode": "+378" }, 'ST':{ "name": "Sao Tome and Principe", "phoneCode": "+239" }, 'SA':{ "name": "Saudi Arabia", "phoneCode": "+966" }, 'SN':{ "name": "Senegal", "phoneCode": "+221" }, 'CS':{ "name": "Serbia and Montenegro", "phoneCode": "+381" }, 'SC':{ "name": "Seychelles", "phoneCode": "+248" }, 'SL':{ "name": "Sierra Leone", "phoneCode": "+232" }, 'SG':{ "name": "Singapore", "phoneCode": "+65" }, 'SK':{ "name": "Slovakia", "phoneCode": "+421" }, 'SI':{ "name": "Slovenia", "phoneCode": "+386" }, 'SB':{ "name": "Solomon Islands", "phoneCode": "+677" }, 'SO':{ "name": "Somalia", "phoneCode": "+252" }, 'ZA':{ "name": "South Africa", "phoneCode": "+27" }, 'GS':{ "name": "South Georgia and the South Sandwich Islands", "phoneCode": "+500" }, 'ES':{ "name": "Spain", "phoneCode": "+34" }, 'LK':{ "name": "Sri Lanka", "phoneCode": "+94" }, 'SD':{ "name": "Sudan", "phoneCode": "+249" }, 'SR':{ "name": "Suriname", "phoneCode": "+597" }, 'SJ':{ "name": "Svalbard and Jan Mayen", "phoneCode": "+47" }, 'SZ':{ "name": "Swaziland", "phoneCode": "+268" }, 'SE':{ "name": "Sweden", "phoneCode": "+46" }, 'CH':{ "name": "Switzerland", "phoneCode": "+41" }, 'SY':{ "name": "Syrian Arab Republic", "phoneCode": "+963" }, 'TW':{ "name": "Taiwan, Province of China", "phoneCode": "+886" }, 'TJ':{ "name": "Tajikistan", "phoneCode": "+992" }, 'TZ':{ "name": "Tanzania, United Republic of", "phoneCode": "+255" }, 'TH':{ "name": "Thailand", "phoneCode": "+66" }, 'TL':{ "name": "Timor-Leste", "phoneCode": "+670" }, 'TG':{ "name": "Togo", "phoneCode": "+228" }, 'TK':{ "name": "Tokelau", "phoneCode": "+690" }, 'TO':{ "name": "Tonga", "phoneCode": "+676" }, 'TT':{ "name": "Trinidad and Tobago", "phoneCode": "+1" }, 'TN':{ "name": "Tunisia", "phoneCode": "+216" }, 'TR':{ "name": "Turkey", "phoneCode": "+90" }, 'TM':{ "name": "Turkmenistan", "phoneCode": "+993" }, 'TC':{ "name": "Turks and Caicos Islands", "phoneCode": "+1" }, 'TV':{ "name": "Tuvalu", "phoneCode": "+688" }, 'UG':{ "name": "Uganda", "phoneCode": "+256" }, 'UA':{ "name": "Ukraine", "phoneCode": "+380" }, 'AE':{ "name": "United Arab Emirates", "phoneCode": "+971" }, 'GB':{ "name": "United Kingdom", "phoneCode": "+44" }, 'US':{ "name": "United States", "phoneCode": "+1" }, 'UM':{ "name": "United States Minor Outlying Islands", "phoneCode": "+1" }, 'UY':{ "name": "Uruguay", "phoneCode": "+598" }, 'UZ':{ "name": "Uzbekistan", "phoneCode": "+998" }, 'VU':{ "name": "Vanuatu", "phoneCode": "+678" }, 'VE':{ "name": "Venezuela", "phoneCode": "+58" }, 'VN':{ "name": "Viet Nam", "phoneCode": "+84" }, 'VG':{ "name": "Virgin Islands, British", "phoneCode": "+1" }, 'VI':{ "name": "Virgin Islands, U.S.", "phoneCode": "+1" }, 'WF':{ "name": "Wallis and Futuna", "phoneCode": "+681" }, 'EH':{ "name": "Western Sahara", "phoneCode": "+212" }, 'YE':{ "name": "Yemen", "phoneCode": "+967" }, 'ZM':{ "name": "Zambia", "phoneCode": "+260" }, 'ZW':{ "name": "Zimbabwe", "phoneCode": "+263" } }; var selectedCountry = ''; var csClassList = ''; var isCountryFieldExist = jQuery('input[value="country_name"]'); var phoneField = jQuery('input[value="phone_number"]'); var userPhoneCode = ""; var phoneNumberField = jQuery('input[type=tel]'); var userPhoneNumber = ""; if (isCountryFieldExist.length) { jQuery('.country-dropdown').hide(); jQuery('input[value="country_name"]').attr('data-key', 'selectedCountry'); phoneField.attr('data-key', 'phone'); getdialCode(); } function getdialCode(){ let intervalId = setInterval(function(){ let dialCodeField = document.querySelector('.iti__selected-dial-code'); if(dialCodeField){ changeCountryCustom(); addOnChangeAttr(); clearInterval(intervalId); } }) } function changeCountryCustom() { let csClassList = document.querySelector('.iti__flag').classList.value; csClassList = csClassList.replace('iti__flag',''); csClassList = csClassList.replace('iti__','').trim().toUpperCase(); selectedCountry = countries[csClassList]['name']; userPhoneCode = countries[csClassList]['phoneCode']; jQuery('input[data-key ="selectedCountry"]').val(selectedCountry); updatePhoneNumber(); var countryToFind = jQuery('input[data-key=selectedCountry]').val(); var countrySelect = jQuery('.country-dropdown'); var countryOption = countrySelect.find('option:contains("' + countryToFind + '")'); if (countryOption.length) { jQuery('.country-dropdown select').val(countryToFind).trigger("change"); makeSubmitButtonDisable(); } } function addOnChangeAttr() { var targetElement = document.querySelector('.iti__selected-dial-code'); var observer = new MutationObserver(function(mutations) { changeCountryCustom(); }); var config = { attributes: true, childList: true, subtree: true }; observer.observe(targetElement, config); } function updatePhoneNumber() { if (phoneNumberField.val()[0] != '+') { userPhoneNumber = userPhoneCode + phoneNumberField.val(); } else { userPhoneNumber = phoneNumberField.val(); } jQuery('input[data-key="phone"]').val(userPhoneNumber); } function makeSubmitButtonDisable(){ setTimeout(function () { var isError = jQuery('.spf-phone.error-msg').is(':visible'); if (isError) { jQuery('input[type=submit]').attr('disabled', true); jQuery('input[type=submit]').css('opacity', '0.6'); jQuery('input[type=submit]').css('cursor', 'not-allowed'); } else { jQuery('input[type=submit]').attr('disabled', false); jQuery('input[type=submit]').css('opacity', '1'); jQuery('input[type=submit]').css('cursor', 'pointer'); } }, 500); } jQuery('input[type=tel]').blur(function () { if (isCountryFieldExist.length) { updatePhoneNumber(); makeSubmitButtonDisable(); } }); });