לייבלים מרחפים בטפסי אלמנטור

PHOTO EMBED

Tue May 18 2021 19:13:49 GMT+0000 (UTC)

Saved by @Shesek

<script>
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');  
  }
});
</script>
content_copyCOPY

להוסיף גם את ה-CSS הזה ולעשות התאמות selector .elementor-field-group { position: relative; } selector .elementor-field-label { position: absolute; left: 15px; top: 10px; color: #999; z-index: 10; transition: font-size 150ms ease-out, -webkit-transform 150ms ease-out; transition: transform 150ms ease-out, font-size 150ms ease-out; transition: transform 150ms ease-out, font-size 150ms ease-out, -webkit-transform 150ms ease-out; } selector .focused .elementor-field-label { background-color: #fff; line-height:1.5; -webkit-transform: translateY(-100%); transform: translateY(-100%); font-size: .90em; }