Skip to content

Instantly share code, notes, and snippets.

@BinaryKitten
Created March 14, 2016 19:32
Show Gist options
  • Select an option

  • Save BinaryKitten/cfff4b23032d8f808fa7 to your computer and use it in GitHub Desktop.

Select an option

Save BinaryKitten/cfff4b23032d8f808fa7 to your computer and use it in GitHub Desktop.
jQuery(function ($) {
var $mainContent = $('#main-content'),
$cat_links = $('.category-filters li a')
;
$cat_links.on('click', function (e) {
e.preventDefault();
var $el = $(this),
value = $el.attr("href")
;
$mainContent.animate({opacity: "0.5"});
$mainContent.load(value + " #main-content", function () {
$mainContent.animate({opacity: "1"});
});
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment