Skip to content

Commit 22b1a14

Browse files
committed
Merge pull request honza#304 from tUrG0n/patch-1
Added Ajax for Coffescript
2 parents 368e9d2 + e9ece38 commit 22b1a14

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

snippets/coffee.snippets

+14
Original file line numberDiff line numberDiff line change
@@ -93,3 +93,17 @@ snippet req
9393
# Export
9494
snippet exp
9595
${0:root} = exports ? this
96+
97+
98+
snippet ajax
99+
$.ajax
100+
url: "${1:mydomain.com/url}"
101+
type: "${2:POST}"
102+
dataType: "${3:xml/html/script/json}"
103+
data: ${4:data}
104+
complete: (jqXHR, textStatus) ->
105+
${5:// callback}
106+
success: (data, textStatus, jqXHR) ->
107+
${6:// success callback}
108+
error: (jqXHR, textStatus, errorThrown) ->
109+
${0:// error callback}

0 commit comments

Comments
 (0)