Getting uncaught exception: Syntax error, unrecognized expression: #

Getting uncaught exception: Syntax error, unrecognized expression: #

Hi there, im using jQuery 1.4.2 with the jQuery-UI 1.8.5.

After initializing the tab function and setting the new action attributes to all form elements i'm getting the: uncaught exception: Syntax error, unrecognized expression: # message

  1. $("#tabs").tabs();
       
    $('#tabs').find('div').each(
            function(){   
                var id = $(this).attr('id');       
                $('#'+id).find('form').each(
                    function(){
                        var action = $(this).attr('action');
                        $(this).attr('action', action + '#' + id);
                    }
                ); /* exception starts here*/
            }
        );













Any suggestion would be helpful. Thanks!