【发布时间】:2013-10-08 17:39:01
【问题描述】:
【问题讨论】:
-
你能告诉我们更多细节吗?可能是 console.log 错误、警告甚至 jsfiddle
标签: javascript jquery
【问题讨论】:
标签: javascript jquery
你看过README.md at Github吗?如果您不应该设法使其工作,请尝试按照说明进行操作并返回详细信息。
【讨论】:
您需要捕获提交表单(我将使用咖啡脚本,但您可以将其转换为等效的 jquery javascript)
$("myform").on "submit" , (e)->
e.preventDefault()
data = $("myform").serialize()
ladda = Ladda.create($(@).find("submit-button")[0])
// in the version i use i have to use [0] because the ladda does not accept a jquery object, it needs a dom object
ladda.start() //this starts the animation
$.post("path/for/post",
data: data
).always ->
ladda.stop() //this stops the animation on any case fail or success
【讨论】: