HEX
Server: LiteSpeed
System: Linux s1.hostssdserver.com 4.18.0 #1 SMP Mon Sep 30 15:36:27 MSK 2024 x86_64
User: dreamlan (1220)
PHP: 8.3.32
Disabled: exec,system,passthru,shell_exec,proc_open,popen,apache_child_terminate
Upload Files
File: /home/dreamlan/public_html/wp-content/plugins/ocean-extra/assets/js/headerSearchForm.js
var $j = jQuery.noConflict();

$j( document ).ready( function() {
	"use strict";
	// Header search form label
	oceanwpHeaderSearchForm();
} );

/* ==============================================
HEADER SEARCH FORM LABEL
============================================== */
function oceanwpHeaderSearchForm() {
	"use strict"

	// Add class when the search input is not empty
	$j( 'form.header-searchform' ).each( function() {

		var form 		= $j( this ),
			listener	= form.find( 'input' ),
			$label 		= form.find( 'label' );

		if ( listener.val().length ) {
			form.addClass( 'search-filled' );
		}

		listener.on( 'keyup blur', function() {
			if ( listener.val().length > 0 ) {
			  form.addClass( 'search-filled' );
			} else {
			  form.removeClass( 'search-filled' );
			}
		} );

    } );

}