Sublime Forum

Doesn't insert snippet

#1

I created an ajax jquery snippet, but whenever I try to insert it using the tabtrigger it only makes the tab trigger text I already typed go away.
I found that if I replace the ‘$’-sign at the beginning of the snippet with ‘jQuery’, it inserts it normally…

$.ajax({ type: "POST", url: "", data: "type=" + value, datatype: "json", success: function(data){ var obj = jQuery.parseJSON(data); if(obj.msg == "success") { //ajax call was successful } } });

0 Likes

#2

Did you escaped $ signs?
You have to do it like so: $.ajax …]

0 Likes

#3

ok, I didn’t know that… >_>
thanks!

0 Likes