Advertisement
Guest User

Untitled

a guest
Oct 8th, 2015
107
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.33 KB | None | 0 0
  1. //Add class in articles depending span
  2. $(".blog-1 .category a").each(function() {
  3. category = $(this).text();
  4. $(this).parents(".blog-1").addClass(category);
  5. })
  6.  
  7. //Filter options
  8. $("#list-of-categories").change(function () {
  9. var value = $( "option:selected" ).text();
  10. $('.blog-1').show().filter(':not(.' + value + ')').hide();
  11. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement