You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
in a file (dashboard.js.coffee) I have the following line at the very top of the file:
<%= add_gritter(truncate("This is a long message that is testing the length of the truncate function.", length: 25), title: "title", after_open: "alert('Opened!');", time: 5000) %>
I get the following error:
SyntaxError: reserved word "function"
When I raise the output of add_gritter, I get the following code:
jQuery(function(){jQuery.gritter.add({time:5000,after_open:function(e){alert('Opened!');},title:'title',text:'This is a long message...'});});
As you can see, this generates javascript which causes problems when I try to parse the file with coffee first.
The text was updated successfully, but these errors were encountered:
Suggest that add_gritter either detect if coffeescript will be rendered, or add new functions like add_gritter_coffee that generates coffeescript instead of javascript.
in a file (
dashboard.js.coffee
) I have the following line at the very top of the file:<%= add_gritter(truncate("This is a long message that is testing the length of the truncate function.", length: 25), title: "title", after_open: "alert('Opened!');", time: 5000) %>
I get the following error:
SyntaxError: reserved word "function"
When I raise the output of add_gritter, I get the following code:
jQuery(function(){jQuery.gritter.add({time:5000,after_open:function(e){alert('Opened!');},title:'title',text:'This is a long message...'});});
As you can see, this generates javascript which causes problems when I try to parse the file with coffee first.
The text was updated successfully, but these errors were encountered: