What am I doing wrong here? I get an "expected identifier" sort of
error with the following code:

(function($) {
    $('.calendarInfo').hide();

    $('#calendar-frontpage').prepend(
        $('<a></a>')
            .html('Show Calendar List')
            .attr('href', 'javascript:;');
            .css({
                'display': 'block',
                'text-align': 'right',
            })
            .click(function() {
                if($(this).html()[0] == 'S') { // I know, this is
grimy, but it works.
                    $('.calendarInfo').show();
                    $(this).html('Hide Calendar List');
                } else {
                    $('.calendarInfo').hide();
                    $(this).html('Show Calendar List');
                }
            });
    );
}) (jQuery);


Thanks,
Thomas Allen

Reply via email to