Last active
December 30, 2015 21:39
-
-
Save srikat/7888764 to your computer and use it in GitHub Desktop.
Equal heights for Content and Primary Sidebar (with Content-Sidebar as the default layout in Genesis settings) in Magazine Pro and placing a vertical separator line between them. http://sridharkatakam.com/adding-vertical-separator-lines-content-sidebars-magazine-pro/#comment-1264
This file contains 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
// Enqueuing Equal heights jQuery for Content and Primary Sidebar (with Content-Sidebar as the default layout in Genesis settings) | |
add_action( 'wp_enqueue_scripts', 'sk_equal_heights' ); | |
function sk_equal_heights() { | |
wp_enqueue_script( 'equalheights_script', get_stylesheet_directory_uri() . '/js/equal-heights.js', array('jquery'), '1.0.0' ); | |
} |
This file contains 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
@media only screen and (min-width: 1024px) { | |
.content-sidebar .content-sidebar-wrap .content { | |
border-right: 1px solid #cbcbcb; | |
padding-right: 3rem; | |
} | |
} |
This file contains 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
jQuery(document).ready(function($) { | |
if (window.innerWidth > 1023) { | |
var highestCol = Math.max( $('.content-sidebar .content-sidebar-wrap .content').height(), $('.content-sidebar .sidebar-primary').height() ); | |
$('.content-sidebar .content-sidebar-wrap .content, .content-sidebar .sidebar-primary').height(highestCol); | |
} | |
}); |
This file contains 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
Screenshot: http://i.imgur.com/DG1Sn1E.png |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment