Created
July 6, 2017 10:15
-
-
Save phucdohong96/7673c36b6aa77230a41864a4383f68bd to your computer and use it in GitHub Desktop.
Equal height column bootstrap
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| add_action('init', 'custom_header_scripts'); // Add Custom Scripts to wp_head | |
| // Load scripts (header.php) | |
| function custom_header_scripts() | |
| { | |
| wp_register_script('equal-height', 'https://cdnjs.cloudflare.com/ajax/libs/jquery.matchHeight/0.7.0/jquery.matchHeight-min.js', array('jquery'), '1.0.0'); | |
| wp_enqueue_script('equal-height'); // Enqueue it! | |
| wp_register_script('scripts', plugins_url('/js/scripts.js', __FILE__), array('jquery'), '1.0.0'); | |
| wp_enqueue_script('scripts'); // Enqueue it! | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| (function ($, root, undefined) { | |
| $(function () { | |
| $('.equal_box').matchHeight(); | |
| }); | |
| })(jQuery, this); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| .equal_box { | |
| height: auto; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <div class="container"> | |
| <div class="row"> | |
| <div class="col-sm-4"> | |
| <div class="equal_box"> | |
| <h2>Oh My God!</h2> | |
| <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad. adipisicing elit, sed do eiusmod tempor</p> | |
| <a href="#" class="btn btn-primary">Link 1</a> | |
| </div> | |
| </div> | |
| <div class="col-sm-4"> | |
| <div class="equal_box"> | |
| <h2>Becky, Look at Her Butt!</h2> | |
| <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor.</p> | |
| <a href="#" class="btn btn-primary">Link 2</a> | |
| </div> | |
| </div> | |
| <div class="col-sm-4"> | |
| <div class="equal_box"> | |
| <h2>It is like so super-duper this is a crazy long sentence big!</h2> | |
| <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad</p> | |
| <a href="#" class="btn btn-primary">Link 3</a> | |
| </div> | |
| </div> | |
| </div> | |
| </div> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment