Viewing 16 posts - 1 through 16 (of 16 total)
  • Author
    Posts
  • #309868

    Hey guys,

    I want the glassy transparent header to stay glassy and transparent. Is there any possibility to acomplish that?

    regards martin

    #310276

    Hey!

    Do you want the header to stay glassy even when scrolled?

    Regards,
    Josue

    #310575

    Yes.

    Regards Martin

    #310605

    Hi,

    Open js/avia.js and look for lines:

                    if(transparent)
                    {
                    	if(st > 50)
                    	{
                    		header.removeClass('av_header_transparency');
                    	}
                    	else
                    	{
                    		header.addClass('av_header_transparency');
                    	}
                    }
    

    Replace them by this:

                    if(transparent)
                    {
                    		header.addClass('av_header_transparency');
                    }
    

    Regards,
    Josue

    • This reply was modified 10 years, 3 months ago by Josue.
    #315917

    awesome! thanks!

    #316031

    You are welcome, glad to help :)

    Regards,
    Josue

    #318841

    Hi Josue, I wrote a few minutes ago the same question and found now this post. Thanks. Is there a way to put this code snipped into my enfold child theme for future updates?

    #318937

    Hey!

    You’d need to embed a modified js/avia.js from your child theme installation, try putting this code in your child theme functions.php:

    function change_aviajs() {
       wp_dequeue_script( 'avia-default' );
       wp_enqueue_script( 'avia-default-child', get_stylesheet_directory_uri().'/js/avia.js', array('jquery'), 2, true );
    }
    add_action( 'wp_enqueue_scripts', 'change_aviajs', 100 );

    Cheers!
    Josue

    #506366

    Hi perfect it workt flawless..

    To use the child theme, do i need to copy the js/avia.js to my child theme folder? Or is the functions.php snippit enough?

    • This reply was modified 9 years, 3 months ago by c3computers.
    #506376

    Ive added the code above to my child Funtions.php. Now the menu works again in the child theme only other fuctions like the ICON pupups doesnt work anymore.

    http://c3computers.c3dev.nl/

    #506627

    Hey!

    The icons do popup on my end (Chrome – OS X), try reloading the page some times.

    Cheers!
    Josue

    #506834

    i disabled the child theme again so that’s why it workt.

    With the child theme enabled and the folowing snippet in functions.php

    function change_aviajs() {
       wp_dequeue_script( 'avia-default' );
       wp_enqueue_script( 'avia-default-child', get_stylesheet_directory_uri().'/js/avia.js', array('jquery'), 2, true );
    }
    add_action( 'wp_enqueue_scripts', 'change_aviajs', 100 );

    The popups wont show. (without the code in functions.php from the child theme it works)

    But i think that then the js/avia.js will be overwriten?

    #506869

    Hi!

    You need to create an avia.js (a duplicate) file at the indicated path:
    http://c3computers.c3dev.nl/wp-content/themes/enfold-child/js/avia.js

    Best regards,
    Josue

    #536108

    For anyone who uses newer theme versions and still wants the header to shrink when you scroll:

    Change

    if(transparent)
                    {	
                    	if(st > 50)
                    	{	
                    		//header.removeClass('av_header_transparency');
                    		av_change_class(header, 'remove', 'av_header_transparency');
                    	}
                    	else
                    	{
                    		//header.addClass('av_header_transparency');
                    		av_change_class(header, 'add', 'av_header_transparency');
                    	}
                    }
    
                   
                }

    To:

    if(transparent)
                    {	
                    	if(st > 50)
                    	{	
                    		//header.removeClass('av_header_transparency');
                    		//av_change_class(header, 'remove', 'av_header_transparency');
                    	}
                    	else
                    	{
                    		//header.addClass('av_header_transparency');
                    		av_change_class(header, 'add', 'av_header_transparency');
                    	}
                    }
    

    So you only have to comment out the 1 line to make header always transparant AND remain shrinking header.

    • This reply was modified 9 years, 1 month ago by lucasvrooij.
    #536236

    Thanks for sharing it @lucasvrooij.

    Regards,
    Josue

    #573600

    Hi It work perfect like this

    At to childtheme function.php

    function change_aviajs() {
       wp_dequeue_script( 'avia-default' );
       wp_enqueue_script( 'avia-default-child', get_stylesheet_directory_uri().'/js/avia.js', array('jquery'), 2, true );
    }
    add_action( 'wp_enqueue_scripts', 'change_aviajs', 100 );

    Copy
    /httpdocs/wp-content/themes/enfold/js/avia.js

    To
    httpdocs/wp-content/themes/enfold-child/js/avia.js

    Create folder ‘js’ if its not existing.

    Open ‘avia.js and replace

    if(transparent)
                    {	
                    	if(st > 50)
                    	{	
                    		//header.removeClass('av_header_transparency');
                    		av_change_class(header, 'remove', 'av_header_transparency');
                    	}
                    	else
                    	{
                    		//header.addClass('av_header_transparency');
                    		av_change_class(header, 'add', 'av_header_transparency');
                    	}
                    }
    
                   
                }

    With:

    if(transparent)
                    {	
                    	if(st > 50)
                    	{	
                    		//header.removeClass('av_header_transparency');
                    		//av_change_class(header, 'remove', 'av_header_transparency');
                    	}
                    	else
                    	{
                    		//header.addClass('av_header_transparency');
                    		av_change_class(header, 'add', 'av_header_transparency');
                    	}
                    }
    

    Good luck!

    Topic can be closed

Viewing 16 posts - 1 through 16 (of 16 total)
  • The topic ‘Glassy transparent header’ is closed to new replies.