Search code examples
twitter-bootstrapasp.net-mvc-3accordion

MVC3 - Twitter Bootstrap Collapse is only working on the root URL


I've got an accordion on my _Layout page, and it's only working when I load the root URL.

~/ -> The root URL, the accordion works here.

~/Main/Home -> The accordion does not work here, even though it's the same view as ~/.

~/MyController/MyAction -> The accordion does not work here.

I removed all content from the Home view, and from one of my other views, so the only difference is the URL.

Any suggestions would be greatly appreciated.


Solution

  • In case anyone else ever has this issue, my css and script files were not linked as relative paths, so the program was looking for the files by appending the location to the route.