Using jquery to change a form action prevents css and js files from loading?

I have this jQuery that dynamically changes a form action

$('#searchFormTitle').change(function() {
    $('#searchFormBar').attr('action', '/searchEvents/' + $('#searchFormTitle').val());
});

However, because of this line, when the post request finishes, being dealt with at this address in the router

/searchevents/:title

My css/jquery files, but only some of them, seem to be unable to load, and the path to the file has an extra /searchevents/ in front of it, and it shouldn't, which makes the file search null.

It definitely has something to do with the address change, but I'm not sure what.

Any ideas appreciated,

thanks!