Skip to content

Instantly share code, notes, and snippets.

never stop.

Matheus Pratta MatheusMK3

never stop.
Block or report user

Report or block MatheusMK3

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
MatheusMK3 / responsive.js
Created Jul 25, 2015
Fixes page scroll "jumping" on mobile devices with auto-hiding address bar, when it contains a 100% height element.
View responsive.js
/* responsive.js (v. 1.0.0)
* by Matheus Pratta (
* Fixes the page scroll from "jumping" when the user scrolls from a mobile device which auto-hides the address bar.
* Note: for 100% height elements, instead of seeing a jump in the scroll, the user may see a jump on the element itself (mostly when it's vertically centered)
* Requires: jQuery
$(document).ready(function() {
.scroll(function() {
window._scroll_pos = $(window).scrollTop();
MatheusMK3 / smooth.jquery.js
Last active Dec 3, 2015
jQuery plugin to smoothly scroll the page when a link referencing an element ID is clicked.
View smooth.jquery.js
/* smooth.jquery.js (ver 1.0.3)
* by Matheus Pratta (
* Requires: jQuery
* Optional: jQuery UI (for animations other than 'linear' and 'swing') - required by default
// Thanks Sebastien Lorber for this snippet
function canonicalize (url) {
var div = document.createElement('div');
div.innerHTML = '<a></a>';
You can’t perform that action at this time.