#List of countries
It's time someone compiled a list of countries to use within a web application. This gist attempts to make a first move at that.
I've also compiled a list of nationalities
#List of countries
It's time someone compiled a list of countries to use within a web application. This gist attempts to make a first move at that.
I've also compiled a list of nationalities
| <div class="container"><h3>.row-flex (make columns equal heights in each row)</h3></div> | |
| <div class="container"> | |
| <div class="row row-flex row-flex-wrap"> | |
| <div class="col-md-3"> | |
| <div class="panel panel-default flex-col"> | |
| <div class="panel-heading">Title flex-col</div> | |
| <div class="panel-body flex-grow">Content here -- div with .flex-grow</div> | |
| <div class="panel-footer">Footer</div> | |
| </div> | |
| </div> |
| function collapse(){ | |
| $.myView.collapse(); | |
| // $.myView.expand(); | |
| } |
| var Validations = (function(){ | |
| var Validation = function() { | |
| var name = $("[name='nome']"); | |
| var email = $("[name='email']"); | |
| var empresa = $("[name='empresa']"); | |
| var telefone = $("[name='telefone']"); | |
| var mensagem = $("[name='mensagem']"); | |
| var regex = /^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/; |
| function formatDuration (seconds) { | |
| return [60, 3600, 86400, 31536000] | |
| .reduceRight(function (results, current) { | |
| var seconds = results.pop(); | |
| results.push(Math.floor(seconds / current)); | |
| results.push(seconds - results[results.length - 1] * current); | |
| return results; | |
| }, [seconds]) | |
| .map(function (value, index) { | |
| var words = ['year', 'day', 'hour', 'minute', 'second']; |
| *.unselectable { | |
| -moz-user-select: none; | |
| -khtml-user-select: none; | |
| -webkit-user-select: none; | |
| /* | |
| Introduced in IE 10. | |
| See http://ie.microsoft.com/testdrive/HTML5/msUserSelect/ | |
| */ | |
| -ms-user-select: none; |
| /* | |
| * Metadata - jQuery plugin for parsing metadata from elements | |
| * | |
| * Copyright (c) 2006 John Resig, Yehuda Katz, J�örn Zaefferer, Paul McLanahan | |
| * | |
| * Dual licensed under the MIT and GPL licenses: | |
| * http://www.opensource.org/licenses/mit-license.php | |
| * http://www.gnu.org/licenses/gpl.html | |
| * | |
| * Revision: $Id: jquery.metadata.js 3640 2007-10-11 18:34:38Z pmclanahan $ |
| $.fn.dataTable.fnTables(true); //this gets all visible dataTables... | |
| $('#givenTable').dataTable().fnAdjustColumnSizing(); //this adjusts a given dataTable | |
| $.each($.fn.dataTable.fnTables(true), function(singleTable) { | |
| $(singleTable).dataTable().fnAdjustColumnSizing(); | |
| }); // And this just don't work! Don't know why... | |
| $.each($.fn.dataTable.fnTables(true), function(idx, singleTable) { | |
| $(singleTable).dataTable().fnAdjustColumnSizing(); | |
| }); // This works! |
| function getURLParameter(name) { | |
| return decodeURIComponent( | |
| (RegExp('[?|&]'+name + '=' + '(.+?)(&|$)').exec(location.search)||[null,null])[1] | |
| ); | |
| } | |
| function setURLParameter(name,value){ | |
| var search, | |
| getParam = getURLParameter(name), | |
| isParamInUrl = (getParam !== null && getParam !== "" && getParam !== "null" && (typeof getParam === "string" && getParam.length > 0)); |