JQuery how to run script on button press
<p>What I'm doing is making a theme with two layouts, which are changeable by button press, from standard blog layout to a gallery layout etc.</p>

<p>However I wan't to run the infinite scroll script when the button is pressed for the gallery layout, everything works except for infinite scroll.</p>

<p>How can I run another script along with this? Kinda like taking away the <code>&lt;!-- / --&gt;</code> around a script to activate it, if you know what I mean.</p>

<pre><code>$("a.button").toggle(function() {
        $(this).addClass("toggle");
        $("div.posts").fadeOut("fast", function() {
            $(this).fadeIn("fast").addClass("gallery");
        });
    }, function() {
        $(this).removeClass("toggle");
        $("div.posts").fadeOut("fast", function() {
            $(this).fadeIn("fast").removeClass("gallery");
        });
    }); 
});
</code></pre>
