Skip to content

Instantly share code, notes, and snippets.

@jrmoran
Created February 19, 2011 18:52
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 jrmoran/835272 to your computer and use it in GitHub Desktop.
Save jrmoran/835272 to your computer and use it in GitHub Desktop.
var PortfolioBuilder = function() {
var $context = "";
var symbols = [];
var that = this;
return{
init: function(context) {
$context = $(context);
this.initSymbols();
this.updateButtons();
},
addCompany: foo(),
removeCompany: foo(),
update: foo(),
show: foo(),
hide:foo(),
hasCompany: foo(),
// build portfolio and send the results to Portfolio Object
evaluate: function() {
$.ajax({
type: "POST",
url:base + "build_portfolio",
beforeSend:function() {
// show loader
$context.find('.loader').show();
},
success: function(JSONdata) {
$context.find('.loader').hide();
Portfolio.build2(JSONdata);
}
});
}
}
}();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment