Load content into div based on month
<p>I am needing to load content for the specific month defined by the user. If the user picks the month of July, a list of events (the content in the this case) is shown for the month of July. If the user picks June, all of the June events are shown. Right now, I have a script set up to where the user clicks a "next" link to switch months. Only month is shown at a time. When the user clicks the "next" link, I would like for all of the next months content to load. For example, if the user is on the month of June and they click next than July will will show up as well as all of the July events. To load the new events I am using:</p>

<pre><code>window.location = "/&lt;?php echo $site_slug; ?&gt;/ministries/events/&lt;?php echo $_GET['year']; ?&gt;/&lt;?php echo $_GET['month']; ?&gt;;
</code></pre>

<p>This is called when the user clicks the "next" button. The $_GET['year'] and $_GET['month'} variables are being populated by an API. When I click the next button, I am not getting the "year" and "month" values but just a hashtag. My question is, is the javascript syntax correct?</p>

<p>EDIT: Added more code:</p>

<p>Jquery:</p>

<pre><code>    &lt;script type="text/javascript"&gt;
        $('document').ready(function(){
            $(".event_months li:nth-child(3)").addClass("doShow");

            $("a.next").click(function() {
                $('.first').toggleClass("first");
                var $toHighlight = $('.doShow').next().length &gt; 0 ? $('.doShow').next() : $('.event_months li').first();
                $('.doShow').removeClass('doShow');
                $toHighlight.addClass('doShow');
                window.location = "/&lt;?php echo $site_slug; ?&gt;/ministries/events/&lt;?php echo $_GET['year']; ?&gt;/&lt;?php echo $_GET['month']; ?&gt;;

            });

          });
     &lt;/script&gt;
</code></pre>

<p>Not sure if the API call will help but here it is:</p>

<pre><code>&lt;?php getContent(
    "event",
    "display:list", 
    "order:recent",
    "find_group:".$site_slug,
    "groupby:month",
    "year:".$_GET['year'], 
    "month:".$_GET['month'],
    "group_show:&lt;li class='noShow'&gt;__slug__&lt;/li&gt;"
    ); 
?&gt; 
</code></pre>
