Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //Add class in articles depending span
- $(".blog-1 .category a").each(function() {
- category = $(this).text();
- $(this).parents(".blog-1").addClass(category);
- })
- //Filter options
- $("#list-of-categories").change(function () {
- var value = $( "option:selected" ).text();
- $('.blog-1').show().filter(':not(.' + value + ')').hide();
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement