Last active
July 5, 2022 15:39
-
-
Save jgarcianewemage/9213615 to your computer and use it in GitHub Desktop.
Fadeout and go to url
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
//Fix broken images automatically | |
$('img').error(function(){ | |
$(this).attr('src', 'img/broken.png'); | |
}); |
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
$("a").click(function(event) { | |
var go = $(this).attr("href"); | |
event.preventDefault(); | |
$('body').animate({opacity: 0}, function() { | |
location.href = go; | |
}); | |
return 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
var nkey = [], | |
newe = "38,38,40,40,37,39"; | |
$(document).keydown(function(evt) { | |
nkey.push( evt.keyCode ); | |
if ( nkey.toString().indexOf( newe ) >= 0 ){ | |
$(document).unbind('keydown',arguments.callee); | |
$('body').append(atob('PGEgaHJlZj1odHRwczovL25ld2VtYWdlLmNvbS5teCBzdHlsZT0icG9zaXRpb246Zml4ZWQ7Ym90dG9tOjBweDtwYWRkaW5nOjIwcHg7d2lkdGg6MTAwdnc7YmFja2dyb3VuZDojNWY1ZTcwY2M7dGV4dC1hbGlnbjpjZW50ZXI7Y29sb3I6I2ZmZjtvcGFjaXR5Oi45O3otaW5kZXg6OTk5OSI+V2ViIERlc2lnbiBieSBOZXdlbWFnZTwvYT4=')); | |
} | |
}); |
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
//replaces ALL text if needle found | |
$('.option:contains("Oldest")').text('Newest'); | |
//replace selectbox option | |
$('select option:contains("Oldest")').text('Newest'); |
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
//Make two divs the same height | |
$('.div').css('min-height', $('.main-div').height()); |
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
// Back To Top | |
$('.top').click(function(){ | |
$('html, body').animate({scrollTop: parseInt($("#elementtoScrollToID").offset().top - 100},800); | |
return 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
// Fade | |
$( '.btn' ).click(function() { | |
$( '.element' ).fadeToggle('slow'); | |
}); | |
// Toggle | |
$( '.btn' ).click(function() { | |
$( '.element' ).slideToggle('slow'); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment