Website On Devices
Project List Filter
When doing the project list filter function, instead of using plugin or extension, I code the filter function by myself with jQuery.
Here is the simple description how I did it.
- Use the WP_Query function to get the project list object from the database.
- With the jQuery.data( element, key, value ), the single project category name(WordPress, jQuery, React, etc. )can be stored in the specified element.
- Binding the function to category tag buttons about looping the project list object to get the same value as the tag name.
- Finally, using hide() function to hide the already output list and fadeIn() function to show the specified tag list the user chosen.