Skip to content

Instantly share code, notes, and snippets.

View brettjonesdev's full-sized avatar

Brett Jones brettjonesdev

View GitHub Profile
@brettjonesdev
brettjonesdev / cors-post.js
Created April 16, 2014 13:52
Example of how to set up a CORS post to different domain.
$('#form').submit(function(e) {
e.preventDefault();
var data = {
subject: $('[name=body]).val(),
body: $('[name=body]).val()
};
$.ajax({
url: SALES_FORCE_URL,
method: 'POST',
@brettjonesdev
brettjonesdev / app.js
Created March 24, 2014 16:25
Issue with onDomRefresh not being very reliable
var App = new Backbone.Marionette.Application();
App.addRegions({
main: '#main'
});
App.addInitializer(function() {
console.log('here');
App.main.show(new MainLayout())
});