Skip to content

Instantly share code, notes, and snippets.

@Solijons
Created December 24, 2018 02:37
Show Gist options
  • Save Solijons/43ce6394e305ab8d61330c1c12f8114b to your computer and use it in GitHub Desktop.
Save Solijons/43ce6394e305ab8d61330c1c12f8114b to your computer and use it in GitHub Desktop.
Jquery effects
$(document).ready(() => {
$('.hide-button').on('click', () => {
$('.first-image').hide();
});
$('.show-button').on('click', () => {
$('.first-image').show();
});
$('.toggle-button').on('click', () => {
$('.first-image').toggle();
});
$('.fade-out-button').on('click', () => {
$('.fade-image').fadeOut(500)
});
$('.fade-in-button').on('click', () => {
$('.fade-image').fadeIn(4000)
});
$('.fade-toggle-button').on('click', () => {
$('.fade-image').fadeToggle('fast');
});
$('.up-button').on('click', () => {
$('.slide-image').slideUp(100);
});
$('.down-button').on('click', () => {
$('.slide-image').slideDown('slow')
});
$('.slide-toggle-button').on('click', () => {
$('.slide-image').slideToggle(400)
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment