This file contains 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
function paginate(array, page_size, page_number) { | |
// human-readable page numbers usually start with 1, so we reduce 1 in the first argument | |
return array.slice((page_number - 1) * page_size, page_number * page_size); | |
} | |
console.log(paginate([1, 2, 3, 4, 5, 6], 2, 2)); | |
console.log(paginate([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11], 4, 1)); |
This file contains 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
dragElement(document.getElementsByClassName("btn-group")[0]); | |
function dragElement(elmnt) { | |
var pos1 = 0, | |
pos2 = 0, | |
pos3 = 0, | |
pos4 = 0; | |
if (document.getElementsByClassName(elmnt.className + "-header")[0]) { | |
// if present, the header is where you move the DIV from: | |
document.getElementsByClassName(elmnt.className + "-header")[0].onmousedown = dragMouseDown; |
This file contains 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
:root { | |
--main-color: #233DF9; | |
--primary-color: #233df9; | |
--primary-font-color: #FFF; | |
--primary-border-color: #b5bdf9; | |
--primary-light-color: #F2F3FF; | |
--primary-transparent-color: #233df90F; | |
--seconday-color: #000000; |
This file contains 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
[{ | |
"cod": 1, | |
"name": "ACTIVO", | |
"level": 0, | |
"parent_id": null, | |
"type": 1, | |
"load_as": 1 | |
}, | |
{ | |
"cod": 11, |
OlderNewer