Skip to content

Instantly share code, notes, and snippets.

@jimjeffers
Created February 14, 2012 21:39
Show Gist options
  • Save jimjeffers/1830687 to your computer and use it in GitHub Desktop.
Save jimjeffers/1830687 to your computer and use it in GitHub Desktop.
$.ajax({
url: url
data:
cuepoints: @player.cuepoints
type: "POST"
dataType: "json"
error: (jqXHR, textStatus, errorThrown) =>
@player.errorFlashMessage.html("There was a problem saving the cuepoint data at this time.")
@player.container.addClass(@player.errorClass)
@removeSpinner()
success: (data) =>
console.log data
if data['status'] == 'success'
console.log "It worked"
else
console.log "It failed"
@removeSpinner()
})
{cuepoints: [
{index:0, time:0},
{index:1, time:4.85},
{index:2, time:9.09},
{index:3, time:10.09}
]}
<script type="text/javascript">
timingModule({
config_url:"/data",
savetimings_url:"/data/success.json",
id:"430-video",
format:"xml"
});
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment