jQuery(document).ready(function ($) { 'use strict'; if (vi_wpvs_admin_settings?.auto_detect_swatches_profile){ $(document).on('change','select#vi-wpvs-attribute_display_default',function (){ switch ($(this).val()){ case 'button': case 'radio': if (!$('#vi-wpvs-attribute_profile_default-vi_wpvs_button_design').prop('checked')){ $('#vi-wpvs-attribute_profile_default-vi_wpvs_button_design').trigger('click'); } break; case 'variation_img': if (!$('#vi-wpvs-attribute_profile_default-vi_wpvs_image_design').prop('checked')){ $('#vi-wpvs-attribute_profile_default-vi_wpvs_image_design').trigger('click'); } break; } }); } $('.vi-ui.vi-ui-main.tabular.menu .item').vi_tab({ history: true, historyType: 'hash' }); $('.ui-sortable').sortable({ placeholder: 'wpvs-place-holder', }); handleInit(); function handleInit() { $('.vi-ui.accordion').vi_accordion('refresh'); $('.vi-ui.dropdown').unbind().dropdown(); handleValueChange(); handleCheckBox(); handleColorPicker(); } // change name function handleValueChange() { $('.vi-wpvs-names').unbind().on('keyup', function () { $(this).parent().parent().parent().find('.vi-wpvs-accordion-name').html($(this).val()); }); $('input[type = "number"]').unbind().on('change', function () { let min = parseFloat($(this).attr('min')) || 0, max = parseFloat($(this).attr('max')), val = parseFloat($(this).val()) || 0; if (min > val) { $(this).val(min); } else { $(this).val(val); } if (max && max < val) { $(this).val(max); } }); } function handleCheckBox() { $('.vi-ui.checkbox').unbind().checkbox(); $('input[type="checkbox"]').unbind().on('change', function () { if ($(this).prop('checked')) { $(this).parent().find('input[type="hidden"]').val('1'); if ($(this).hasClass('vi-wpvs-single_attr_title-checkbox')) { $('.vi-wpvs-single_attr_title-enable').removeClass('vi-wpvs-hidden'); } } else { $(this).parent().find('input[type="hidden"]').val(''); if ($(this).hasClass('vi-wpvs-single_attr_title-checkbox')) { $('.vi-wpvs-single_attr_title-enable').addClass('vi-wpvs-hidden'); } } }); } function handleColorPicker() { $('.vi-wpvs-color').each(function () { $(this).css({backgroundColor: $(this).val()}); }); $('.vi-wpvs-color').unbind().minicolors({ change: function (value, opacity) { $(this).parent().find('.vi-wpvs-color').css({backgroundColor: value}); }, animationSpeed: 50, animationEasing: 'swing', changeDelay: 0, control: 'wheel', defaultValue: '', format: 'rgb', hide: null, hideSpeed: 100, inline: false, keywords: '', letterCase: 'lowercase', opacity: true, position: 'bottom left', show: null, showSpeed: 100, theme: 'default', swatches: [] }); } $(document).on('click','.vi-wpvs-reset', function () { if (confirm('All settings will be deleted. Are you sure you want to reset yours settings?')){ $(this).attr('type','submit'); } }); $(document).on('click','.vi-wpvs-import', function () { $('.vi-wpvs-import-wrap-wrap').toggleClass('vi-wpvs-hidden'); }); $('.vi-wpvs-save').on('click', function () { $(this).addClass('loading'); let nameArr = $('input[name="names[]"]'); let z, v; for (z = 0; z < nameArr.length; z++) { if (!$('input[name="names[]"]').eq(z).val()) { alert('Name cannot be empty!'); if (!$('.vi-wpvs-accordion').eq(z).hasClass('vi-wpvs-active-accordion')) { $('.vi-wpvs-accordion').eq(z).addClass('vi-wpvs-active-accordion'); } $('.vi-wpvs-save').removeClass('loading'); return false; } } for (z = 0; z < nameArr.length - 1; z++) { for (v = z + 1; v < nameArr.length; v++) { if ($('input[name="names[]"]').eq(z).val() === $('input[name="names[]"]').eq(v).val()) { alert("Names are unique!"); if (!$('.vi-wpvs-accordion').eq(v).hasClass('vi-wpvs-active-accordion')) { $('.vi-wpvs-accordion').eq(v).addClass('vi-wpvs-active-accordion'); } $('.vi-wpvs-save').removeClass('loading'); return false; } } } $(this).attr('type', 'submit'); }); }); 1.0Centro de Estetica en Palmira Martha Isabel Velez Facial, Corporal, Relajación, SPA, Diseño de Cejas y Mucho más.https://esteticamarthavelez.com/inicioadminhttps://esteticamarthavelez.com/inicio/author/admin/Serviciosrich600338<blockquote class="wp-embedded-content"><a href="https://esteticamarthavelez.com/inicio/servicios/">Servicios</a></blockquote> <script type='text/javascript'> <!--//--><![CDATA[//><!-- /*! This file is auto-generated */ !function(d,l){"use strict";var e=!1,o=!1;if(l.querySelector)if(d.addEventListener)e=!0;if(d.wp=d.wp||{},!d.wp.receiveEmbedMessage)if(d.wp.receiveEmbedMessage=function(e){var t=e.data;if(t)if(t.secret||t.message||t.value)if(!/[^a-zA-Z0-9]/.test(t.secret)){var r,a,i,s,n,o=l.querySelectorAll('iframe[data-secret="'+t.secret+'"]'),c=l.querySelectorAll('blockquote[data-secret="'+t.secret+'"]');for(r=0;r<c.length;r++)c[r].style.display="none";for(r=0;r<o.length;r++)if(a=o[r],e.source===a.contentWindow){if(a.removeAttribute("style"),"height"===t.message){if(1e3<(i=parseInt(t.value,10)))i=1e3;else if(~~i<200)i=200;a.height=i}if("link"===t.message)if(s=l.createElement("a"),n=l.createElement("a"),s.href=a.getAttribute("src"),n.href=t.value,n.host===s.host)if(l.activeElement===a)d.top.location.href=t.value}}},e)d.addEventListener("message",d.wp.receiveEmbedMessage,!1),l.addEventListener("DOMContentLoaded",t,!1),d.addEventListener("load",t,!1);function t(){if(!o){o=!0;var e,t,r,a,i=-1!==navigator.appVersion.indexOf("MSIE 10"),s=!!navigator.userAgent.match(/Trident.*rv:11\./),n=l.querySelectorAll("iframe.wp-embedded-content");for(t=0;t<n.length;t++){if(!(r=n[t]).getAttribute("data-secret"))a=Math.random().toString(36).substr(2,10),r.src+="#?secret="+a,r.setAttribute("data-secret",a);if(i||s)(e=r.cloneNode(!0)).removeAttribute("security"),r.parentNode.replaceChild(e,r)}}}}(window,document); //--><!]]> </script><iframe sandbox="allow-scripts" security="restricted" src="https://esteticamarthavelez.com/inicio/servicios/embed/" width="600" height="338" title="“Servicios” — Centro de Estetica en Palmira Martha Isabel Velez Facial, Corporal, Relajación, SPA, Diseño de Cejas y Mucho más." frameborder="0" marginwidth="0" marginheight="0" scrolling="no" class="wp-embedded-content"></iframe>