Skip to content

Instantly share code, notes, and snippets.

@dustball
Created December 2, 2016 02:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dustball/dbc9f5e763d4e17d330cf9331e532a10 to your computer and use it in GitHub Desktop.
Save dustball/dbc9f5e763d4e17d330cf9331e532a10 to your computer and use it in GitHub Desktop.
function billing() {
$.getJSON( "/api", {
action: "get_billing",
}).done(function( json ) {
if (json['error']) {
$.alert(json['error'], "Error");
} else {
$("#billing_dialog").html(json['data']).dialog({width:760,height:550,buttons: [
{
text: "Ok",
click: function() {
$( this ).dialog( "close" );
}
}]}).dialog("open");
if (ga) {
ga('send', 'pageview', 'billing');
}
}
}).fail(function( jqxhr, textStatus, error ) {
var err = textStatus + ", " + error;
console.log( "Request Failed: " + err );
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment