jQuery add border to table.
- by Kyle Sevenoaks
Hi, I'm a jQuery noob, I tried this:
<input value="1"  type="checkbox" name="mytable" id="checkbox2"  style="float:left;"
        />
{literal}
<script src="http://code.jquery.com/jquery-latest.js"></script>
            <script type="text/javascript">
$(function() {
   //checkbox
   $(".mytable").click(function(){
    $(".mytable").toggleClass('mytableborders');
    });
});
</script>
{/literal}
<table class="mytable" id="cart">....</table>
But it doesn't work, I want the checkbox to change the class of the table from .mytable to .mytableborders.
Thanks :)