jQuery( document ).ready( function() {

	jQuery( '.wp-block-post-title' ).hide();

	jQuery( '.elex_mv_search_prodct_name_btn' ).click( function() {
		var search_val = jQuery( '.elex_mv_search_prodct_name' ).val();
		var u = new URL( location );
		if ( u.searchParams.has( 'search_term' ) ) {
			u.searchParams.set( 'search_term', search_val );
		} else {
			u.searchParams.append( 'search_term', search_val );
		}
		window.location.replace( u );
		jQuery( '.elex_mv_search_prodct_name' ).val( search_val );
	} );

	jQuery( '.elex_mv_search_prodct_cat_btn' ).click( function() {
		var search_val = jQuery( '#vendor-store-category' ).val();
		var u = new URL( location );
		if ( u.searchParams.has( 'category' ) ) {
			u.searchParams.set( 'category', search_val );
		} else {
			u.searchParams.append( 'category', search_val );
		}
		window.location.replace( u );
		jQuery( '#vendor-store-category' ).val( search_val );
	} );

} );
