Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #254467
    #255439

    Hi Linden Mobile!

    Based on Josue’s answer here: https://kriesi.at/support/topic/vertically-align-icon-box-next-to-easy-slider/#post-215568 I guess you must modify the avia.js file to vertical align the icon box. You can load a custom, modified version of avia.js with your child theme or you can modify the file of the parent theme. If you want to modify the file of the parent theme open up enfold/js/avia.js, modify the file and save it. Otherwise copy the file into your child theme folder (place it into the enfold-child/js/ directory) and modify the file there. Then insert this code:

    
    
    if(!is_admin()) add_action('wp_enqueue_scripts', 'avia_register_child_frontend_scripts', 100);
    function avia_register_child_frontend_scripts()
    {
    	$child_theme_url = get_stylesheet_directory_uri();
    	wp_dequeue_script('avia-default');
    
    	//register js
    	wp_register_script( 'avia-default-child', $child_theme_url.'/js/avia.js', array('jquery'), 1, true);
    	wp_enqueue_script( 'avia-default-child' );
    }
    

    into the child theme functions.php file to load your custom avia.js file instead of the default parent theme avia.js file.

    Cheers!
    Peter

    #255449

    That breaks my website. I moved all my custom rules to my child theme so it should still work, but since the update it doens’t anymore. Do you know what I need to change?

    #256169

    Hey!

    Which part specifically breaks your website? Did you move the entire avia.js file your child theme or just your custom javascript? If just your custom stuff you will need to move the whole file including your customizations since Peters code replaces the parent file completely.

    Cheers!
    Devin

    #256182

    No I know. When I added the code the screen was all white. I just deleted and added avia.js again and now the site doenst break but the desired effect doens’t show.

    #256494

    Hey!

    Thank you for the update.

    On the child theme’s avia.js, did you add the modifications Josue suggested? https://gist.github.com/josueochoa/ae8214df978403dfad04

    This goes at the end of avia.js:

    jQuery.fn.heightCalc = function(dir){
        this.each(function(){ 
            if (dir == "prev"){
                jQuery(this).css("height", jQuery(this).prev().height());
            }else{
                jQuery(this).css("height", jQuery(this).next().height());
            }
        });
        return this;
    }
     
    jQuery(window).bind('load resize',function() {
        jQuery(".custom_list_r").parent().heightCalc("prev");
        jQuery(".custom_list_l").parent().heightCalc("next");
    });

    Regards,
    Ismael

    #257565

    I deleted the old and added the rule you just posted but no change I’m afraid.

    #260460

    It sounds like you will need to consult a freelance developer if our customization suggestions aren’t working for you. That way it can be looked at specifically for your site and the customization made from there.

    We recommend Codeable, Envato Studio or http://kriesi.at/contact/customization .

Viewing 8 posts - 1 through 8 (of 8 total)
  • You must be logged in to reply to this topic.