Skip to content

Instantly share code, notes, and snippets.

@nachodd
Created December 16, 2013 04:01
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 nachodd/ff1733573f412d0f8b44 to your computer and use it in GitHub Desktop.
Save nachodd/ff1733573f412d0f8b44 to your computer and use it in GitHub Desktop.
modal bootstrap & javascript objects
//Modal cargando
var dialogs = (function () {
var cargandoDiv = $('#cargandoDialog');
var avisoDiv = $('#modalAviso');
return {
showCargando: function() {
cargandoDiv.modal();
},
hideCargando: function () {
cargandoDiv.modal('hide');
}
};
})();
var collection = (function () {
var keys = [], values = [];
return {
get: function (key) {
var at = keys.indexOf(key);
if (at >= 0) {
return values[at];
}
},
set: function (key, value) {
var at = keys.indexOf(key);
if (at < 0) {
at = keys.length;
}
keys[at] = key;
values[at] = value;
},
remove: function (key) {
var at = keys.indexOf(key);
if (at >= 0) {
keys.splice(at, 1);
values.splice(at, 1);
}
}
};
}());
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment