$(document).ready(function(){
$('.lastest-work__nav-link').click(function(){
// reset active class
$('.lastest-work__nav-link').removeClass("active");
// add active class to selected
$(this).addClass("active");
// return needed to make function work
return false;
});
$(function() {
// create an empty variable
var selectedClass = "";
// call function when item is clicked
$(".lastest-work__nav-link").click(function(){
// assigns class to selected item
selectedClass = $(this).attr("data-rel");
// fades out all portfolio items
$(".demonstration-lastest-work .demonstration-lastest-work__inner").fadeOut(300);
// fades in selected category
$(".demonstration-lastest-work .demonstration-lastest-work__inner" + selectedClass).delay(300).fadeIn(300);
});
});
}); // document ready
$(function() {
// create an empty variable
var selectedClass = "";
// call function when item is clicked
$(".lastest-work__nav-link").click(function(){
// assigns class to selected item
selectedClass = $(this).attr("data-rel");
// fades out all portfolio items
$(".demonstration-lastest-work .demonstration-lastest-work__inner").fadeOut(300);
// fades in selected category
$(".demonstration-lastest-work .demonstration-lastest-work__inner strategy" + selectedClass).delay(300).fadeIn(300);
});