Skip to content

Commit

Permalink
Added Ajax for Coffescript
Browse files Browse the repository at this point in the history
  • Loading branch information
Piotr Yordanov committed Jan 3, 2014
1 parent 368e9d2 commit e9ece38
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions snippets/coffee.snippets
Original file line number Diff line number Diff line change
Expand Up @@ -93,3 +93,17 @@ snippet req
# Export
snippet exp
${0:root} = exports ? this


snippet ajax
$.ajax
url: "${1:mydomain.com/url}"
type: "${2:POST}"
dataType: "${3:xml/html/script/json}"
data: ${4:data}
complete: (jqXHR, textStatus) ->
${5:// callback}
success: (data, textStatus, jqXHR) ->
${6:// success callback}
error: (jqXHR, textStatus, errorThrown) ->
${0:// error callback}

0 comments on commit e9ece38

Please sign in to comment.