Broken function

Broken function

Hi,

I'm having problems with this function. I'm trying to encapsulate a working script into a function. Here is my working code:

<a href="#" onclick="$('#trackBlock01>').slideToggle();return false;">Show tracklist</a>

<div class="track_block" id="trackBlock01">
...
</div>


But when I move it into a function (and added this check box code) it doesn't work:

function checkIt(theId) {
                alert(theId);
                // toggle the albums song list
                $('#trackBlock'+theId).slideToggle();
                // toggle the albums checkbox
                var checkedValue = $('#'+theId).attr('checked') ? 'checked' : '';
                $(':checkbox').attr('checked', checkedValue);
            }


I'm not getting any errors. Its like it can't find the div.

Thanks!

--shawn