Animacja Formularza

jQuery(“input , textarea”).focus(function(){ jQuery(this).parents(‘.elementor-field-group’).addClass(‘focused’); }); jQuery(“input , textarea”).blur(function(){ var inputValue = jQuery(this).val(); if ( inputValue == “” ) { jQuery(this).parents(‘.elementor-field-group’).removeClass(‘focused’); } });Continue reading

Add Color Image for Student Profile

jQuery(document).ready(function($) { var $form = $(‘#wpforms-form-42035’); var $field27_options = $form.find(‘input[name=”wpforms[fields][27]”]’); var $field28 = $form.find(‘input[name=”wpforms[fields][28]”]’); $field27_options.on(‘change’, function() { var selectedOption = $(this).val(); $field28.val(‘https://goodnightrock.com/wp-content/uploads/2023/04/’ + selectedOption + ‘_5x.png’); }); });Continue reading

Untitled Snippet

var soma1 = document.getElementById(‘soma1’); var soma2 = document.getElementById(‘soma2’); var btn = document.getElementById(‘btn’); var result = document.getElementById(‘resultado’); btn.addEventListener(‘click’, function(){ somatotal(); }); function somatotal(){ var soma1Val = parseInt(soma1.value); var soma2Val = parseInt(soma2.value); var soma = soma1Val + soma2Val; document.getElementById(‘resultado’).value = soma; }Continue reading

app

// select the item element const item = document.querySelector(‘.item’); // attach the dragstart event handler item.addEventListener(‘dragstart’, dragStart); // handle the dragstart function dragStart(e) { e.dataTransfer.setData(‘text/plain’, e.target.id); setTimeout(() => { e.target.classList.add(‘hide’); }, 0); } const boxes = document.querySelectorAll(‘.box’); boxes.forEach(box => {…Continue reading