Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

JavaScript

Adding a ul with jQuery to a more posts loading with Ajax

Ok,

So I'm building a new wordpress site using foundation 5

I'm using the a 'load more posts' plugin to load more posts when clicked on my blog page, now I want the posts to load in a grid format, I'm trying to add <ul class="small-block-grid-3"> inside the code the plugin loads with jQuery,

The plugin load this code,
<div class="alm-reveal"> <li> my post </li> </div>

I want to try to rap the <li> in the <ul class="small-block-grid-3"> every time the ajax loads to have the foundation block grid work,

Can this be done, how can I use jQuery/javascript to add this to my code,

Thanks

the code above is missing the code parts

the plugin loads every post with ajax surrounded by this code -

<div class="someclass"> 
   <li> my post </li>
</div>  

And I want to rap

<ul class="small-block-grid-2"> 

around the

<li>

And I would prefer doing it with Javascript/jQuery and not changing the plugin php code,

Thanks