Yes, as Owel says, you need to check your browser console. Press CTRL-SHFT-J to open it up. Whenever I am having a problem with code this is the first place I look. There is a lot of useful information there.
If you look at the error log that he has shown you, you will see that
encodeURICompenent is not defined. You made a simple spelling error. We all make them. The console helps us catch them.