Currently, there is a grid section on the homepage of our site showcasing the two most recent blog posts. I am looking for a Javascript solution to relocate the date to the bottom of each block, outside of the border. For reference, you can visit the following link:
Here is the current structure:
<div class="et_pb_column et_pb_column_4_4">
<div class="et_pb_blog_grid_wrapper">
<div class="et_pb_blog_grid clearfix et_pb_bg_layout_light blog-section" style="position: relative; height: 400px;">
<article id="post-226" class="et_pb_post et_pb_no_thumb post-226 post type-post status-publish format-standard hentry category-uncategorized" style="position: absolute; left: 0px; top: 0px;">
<h2><a href="http://abundancepractice-building.flywheelsites.com/what-you-learned-in-grad-school-is-ruining-your-website-and-10-ways-to-fix-it/">What You Learned In Grad School is Ruining Your Website (and 10 ways to fix it)</a></h2>
<p class="post-meta"> Jun 5, 2015 </p>Blog excerpt text...
</article> <!-- .et_pb_post -->
My goal is to have the p.post-meta move to the bottom of each block in the grid. While I have attempted some JavaScript solutions, here's what I have tried thus far:
jQuery(function($){
$( ".post-meta:nth-child(1)" ).appendTo(".et_pb_post.et_pb_no_thumb:nth- child(1)");
$( ".post-meta:nth-child(2)" ).appendTo(".et_pb_post.et_pb_no_thumb:nth-child(2)");
});
Additionally, another method I have explored is as follows:
jQuery(function($){
if ($('body').hasClass('et_pb_blog_grid')) {
$('.et_pb_post p')
.each(function() {
var n = jQuery(this).find(".post-meta").html();
$(n).clone().insertAfter(jQuery(this).find('.et_pb_post.et_pb_no_thumb'));
});
}
});