This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var identificarResolucao = function() { | |
| resolucao = "res" + screen.width; | |
| areaVisivel = $("body").width(); | |
| //$("#componente").prepend("<br>"+ resolucao); | |
| classe = 'res'; | |
| if (areaVisivel < 800) classe += '800'; | |
| else if (areaVisivel < 960) classe += '960'; | |
| else if (areaVisivel < 1024) classe += '1024'; | |
| else if (areaVisivel < 1088) classe += '1088'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| validarCNPJ = function (cnpj) { | |
| var numeros, | |
| digitos, | |
| soma, | |
| i, | |
| resultado, | |
| pos, | |
| tamanho, | |
| digitos_iguais; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| getOrCreateDialog = function (id) { | |
| $box = $('#' + id); | |
| if (!$box.length) { | |
| $box = $('<div id="' + id + '"><p></p></div>').hide().appendTo('body'); | |
| } | |
| return $box; | |
| } | |
| customAlert(message, title, options, callback){ | |
| callback = callback || function(){}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| //useful snippet to organize website code or widget code. | |
| var MySite = {} | |
| MySite.setupDOM = function(){ | |
| //dom manipulation, etc... | |
| } | |
| MySite.setupEvents = function(){ | |
| //binds, event handlers, event listeners |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| //I found it @ util.js / chrome 16. | |
| function parseQueryParams(location) { | |
| var params = {}; | |
| var query = unescape(location.search.substring(1)); | |
| var vars = query.split("&"); | |
| for (var i=0; i < vars.length; i++) { | |
| var pair = vars[i].split("="); | |
| params[pair[0]] = pair[1]; | |
| } |
NewerOlder