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
// document.ready | |
document.addEventListener("DOMContentLoaded", function() { | |
// your code | |
}, false); | |
// select div | |
var element = document.querySelector("div"); |
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
/** | |
* Construye paginador | |
* Pad: pag. seleccionada + items alrededor de ella. | |
* En el caso de un número grande de páginas: | |
* y pag. seleccionada en posición central: aparece rodeada de puntitos. | |
* " izquierda: aparecen puntitos solo a la derecha | |
* " derecha: aparecen puntitos solo a la izquierda | |
* En el caso de un número pequeño de páginas: | |
* no aparecen puntitos | |
* |
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
$.fn.setAllToMaxHeight = function(){ | |
return this.height( Math.max.apply(this, $.map( this , function(e){ return $(e).height() }) ) ); | |
} | |
// usage: $(‘div.unevenheights’).setAllToMaxHeight() |