Home Download Buy Blog Forum Support

doesn't insert snippet

doesn't insert snippet

Postby dreagan on Thu Jan 26, 2012 7:47 am

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..

Code: Select all
$.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
        }
   }
});
dreagan
 
Posts: 13
Joined: Thu Jan 26, 2012 7:42 am

Re: doesn't insert snippet

Postby iamntz on Thu Jan 26, 2012 8:08 am

Did you escaped $ signs?
You have to do it like so: \$.ajax [....]
iamntz
 
Posts: 917
Joined: Fri Apr 29, 2011 8:52 am
Location: Romania

Re: doesn't insert snippet

Postby dreagan on Thu Jan 26, 2012 9:40 am

ok, I didn't know that.. >_>
thanks!
dreagan
 
Posts: 13
Joined: Thu Jan 26, 2012 7:42 am


Return to Technical Support

Who is online

Users browsing this forum: Yahoo [Bot] and 16 guests