In your code, you have:
Code: Select all
text: '$0'
It should be changed to:
Code: Select all
text: $0
In fact, $0 is a variable, so putting the quotes would be the same as putting a variable inside quotes.
To help understand what happens and debug, I recommend you to use the Development Tools of your browser (Chrome for example) by pressing F12. Then, you can look at the generated JavaScript code by going to the "Source" tab. You can even place breakpoints and debug from there.
Regards,
JS-Support