Finally I solve it. The problem wasn't your slider, but the way sharepoint works.
The solution (maybe another user ask you the same) is to save the code in a txt file, upload it to a sharepoint library and then just link this file in the web part content editor.