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
<!doctype html> | |
<html lang="pt-BR"> | |
<head> | |
<meta charset="utf-8" /> | |
<title>align center with table-container</title> | |
<style> | |
body{ | |
margin: 0; | |
padding: 0; | |
border: 0; |
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
//input: jsonToArray({a: 1, b: 2 , c: 3}); | |
//output: [ ['a', 'b', 'c'], [1, 2, 3] ]; | |
function jsonToArray(obj){ | |
let returnArray = []; | |
let key = []; | |
let values = []; | |
for( let thisKey in obj ){ | |
//console.log( thisKey + ': ' + obj[thisKey] ); | |
key.push( thisKey ); | |
values.push( obj[thisKey] ); |
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
jQuery.fn.extend({ | |
getParent: function(selector){ | |
if( typeof selector == 'string' ){ | |
//if number in string | |
if( !!selector.match(/(\d|\.)/g) ){ | |
if( selector.length == selector.match(/(\d|\.)/g).length ){ | |
return $(this).getParent( Number(selector) ); | |
}; |
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
//jQuery_if_landscape.js | |
let landscape = $(window).innerWidth() >= $(window).innerHeight() ? true : false; |
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
<!doctype html> | |
<html lang="pt-br"> | |
<head> | |
<meta charset="utf-8" /> | |
<meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1, user-scalable=yes, shrink-to-fit=no" /> | |
<title></title> | |
<!-- LIBS --> |
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
.wpb_custom_raw_html{ | |
border: 0; | |
padding: 0; | |
} | |
.wpb_custom_raw_html > .container{ | |
width: 100%; | |
padding: 0; | |
} | |
.wpb_custom_raw_html > .container > .wpb_column > div{ | |
padding: 0; |
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
let array = ['a', 'b', 'c']; | |
array.forEach(function( item, index ){ | |
console.log( item, index ); | |
}); |
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
// getLink.js v2.1 | |
function getLink(link = location.href){ | |
return link.split(/[?#&]/)[0].replace(/\/+$/, ''); | |
}; |
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
/* https://davidwalsh.name/detect-scrollbar-width */ | |
.scrollbar-y-measure{width:100px;height:100px;overflow:scroll;position:absolute;top:-9999px} |
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
.btn:not(.btn-default):not(.btn-primary):not(.btn-success):not(.btn-info):not(.btn-warning):not(.btn-danger):not(.btn-link){ | |
background-color: rgba(0, 0, 0, 0); | |
white-space: normal; | |
} | |
.btn:focus:not(.btn-default):not(.btn-primary):not(.btn-success):not(.btn-info):not(.btn-warning):not(.btn-danger):not(.btn-link){ | |
box-shadow: none; | |
white-space: normal; | |
} |