Jquery ajax groups

By following the post https://gist.github.com/GhiGt/6129448, I modified the controller & the helper of the Groups view. However, I still have errors : 
1) Some windows open at the loading of the full page
2) TypeError: Cannot call method 'each' of undefined when I click wherever in the students or the groups part
3) According to the console, trouble with application.js
...