There don't seem to be any problems with the code
You'll need to be a bit more descriptive about the problem. Are there any console errors upon execution?