There is a code that is located in the body:

<script type="text/javascript"> jQuery(document).ready(function() { //Выравниваем текст с изображением на главной странице jQuery(".fu_third_section_img", this).each(function(){ var height = jQuery(this).height(); jQuery(".fu_third_section_text").css("height", height); }); }); </script> 

which aligns the text field to the height of the downloaded image (wordpress):

 <div class="row"> <div class="col-sm-6"> <div class="fu_third_section_text"> <h2><?php echo get_option('woo_fu_name_dostoprim1'); ?></h2> <span><?php echo get_option('woo_fu_text_dostoprim1'); ?></span> </div> </div> <div class="col-sm-6"> <div class="fu_third_section_img"> <img src="<?php echo get_option('woo_fu_image_dostoprim1'); ?>" class="img-responsive" alt=""> </div> </div> </div> 

When you first load the script does not work. Starts to work only after reloading the page. In the console, only JQMIGRATE: Migrate is installed, version 1.4.1. Here is the site http://barbaris-kzn.ru . Help pliz!

    1 answer 1

    There is a suspicion that the pictures do not have time to load. Solution options:

    1) Use load() instead of ready() . Ready() means loading the page, but not the images in it.

    2) Specify the size of the pictures in the <img> :

      <img src=".." width=1200 heigth=600> 
    • Changed to `jQuery (window) .load (function () {...});` Did not help. Generally no longer customized in height. Tried even the waitForImages plugin does not work either. - Rustem Garaev
    • And to set the height using height is not possible because I would like to maintain adaptability. - Rustem Garaev