I’m using jQuery Isotope with filter method: http://isotope.metafizzy.co/demos/filtering.html
I would like to add an additional function when you click on a filter: a p text that shows up, different for each filter.
For now, I can only bring up the same text. I want to know how to create a different one for each category, which is shown only when you click on the filter, here’s my jsFiddle: http://jsfiddle.net/itzuki87/Xy5pZ/
var $container = $('#container');
$container.isotope({
});
$('#filters a').click(function(){
var selector = $(this).attr('data-filter');
$(".text_category").slideUp(500);
$(".text_category").slideDown(500);
$container.isotope({ filter: selector });
return false;
});
Can anyone help me? Thank you.
you could use class added in data-filter in p, like
And paragraphs
And js
Demo: Updated Fiddle