Let's try collapsing out the irrelevant code and take out the newlines too:
$('#select').change(function() {});.trigger('change');
Does that make it easier to spot the error?
-Mike
> From: Rick Faircloth
>
> Hi, all...
>
> I keep getting this error from Firebug:
>
> syntax error
> .trigger('change'); \n
>
> for this code:
>
> $(document.ready(function() {
>
> $('#select').change(function() {
>
> var newName = '';
> $('select
> option:selected').each(function() {
> newname += $(this).text() + ' ';
> });
>
> $('#name-div p').text(newName+' [Change]');
> $('#name-div').fadeIn(500);
>
> });
>
> .trigger('change');
> });
>
> What's wrong with it?
>
> Thanks,
>
> Rick
>