jQuery and AJAX Tutorials 34 | Coding AJAX Filters

preview_player
Показать описание
"Yeah, we finally got to my favorite part of the tutorial series. I love algorithms and I hope you will enjoy coding the filter.
In this tutorial we will figure out, how we can make only the images of a certain category appear on the screen."

Рекомендации по теме
Комментарии
Автор

we can also use
  var category=$(this).html();
  $("#portfolio li").fadeOut();
  $("#portfolio li."+category).fadeIn();

amitskhandelwal
Автор

Once you've setup the filters and click on a category, which works fine. I then click on a picture and use the arrows and it shows all the pictures when cycling through these. How do I only see the ones I've filtered instead of showing all of them when I cycle through with the arrow keys?

samoanjoe
Автор

This is not AJAX as the title suggests :/ It is jQuery. Good tutorials

renierdebruyn
Автор

Hi, if this will work with wordpress pagination? when i get a lot of data, created by wordpress loop?

gabriellewolf
Автор

Hi I like you tutorials.
There is no need to do a each function. You can just

$('#portfolio li').hide();
$('#portfolio').find('.' + category).fadeIn();

johansrk
Автор

also posible:
$("#portfolio li").fadeOut();
$('.'+category).fadeIn();

Автор

Once you've setup the filters and click on a category, which works fine. I then click on a picture and use the arrows and it shows all the pictures when cycling through these. How do I only see the ones I've filtered instead of showing all of them when I cycle through with the arrow keys?

MrArturf
visit shbcf.ru