Rewritten:

-----------------------------------------------------------------------

<style>
.gallery {background:red;}
.list {background:green;}
</style>

<script language="javascript" type="text/javascript">
$(document).ready(function(){
        $("#thing").click(function(){
                $("#resultsview").toggle(
                        function () {
                                $("#resultsview").removeClass('list');
                                $("#resultsview").addClass('gallery');
                        },
                        function () {
                                $("#resultsview").removeClass('gallery');
                                $("#resultsview").addClass('list');
                });
        });
});
</script>

<p id="thing">click</p>
<ul id="resultsview" class="list">
        <li>blah</li>
        <li>blah</li>
</li>

-----------------------------------------------------------------------

Haven't tested it, but I think this is the right direction.  Hope that
helps.

Reply via email to