Just syntactic sugar to indicate that those variables are jquery objects. They serve no other purpose. So $txt could have just as easily be called txt. I just named it differently to make it easy to spot.
The example project is done. There is a problem with your patch, it requires a rather recent version of jQuery. Django-CMS uses 1.4.2, with which .data() is not working properly. 1.9.0 is not working either, not because of what you wrote, but because of nivoslider. With 1.7.2, everything works fine.
Add this before your script and everything will work perfectly: