I am currently working on a smaller project where i try to achieve something similair to when you visit a online store and get these options “all” “small” “medium” “large” through a sidebar/nav or similair.
When you etc tick “small” off “all” also ticks off and and the options where “small” only is abaliable this “category” will dissapear and all of the remaning “large” & “medium” stays and ofc align together, also the pagination has to shrink.
I hope you get an idea of what i am thinking, how can i achieve this? which language will be used, i assume html,css,mysqli,php,jquery/ajax? any tutorials or keywords i guess i have to build a database system?
What i will use it for is something a bit different to what the shop/store use it for, i will use it for my youtube channels videos, i make different videos like no commentary, highlights & cinematics etc etc so it would be nice if people could tick off the categories they dont like and only get to watch the ones they like?
This is called filtering, usually this type of thing is done server side by add query string params such as ?size=small to the url and then returning just those items in the page.
Can be done in javascript too by either tagging the items in the list with something for the different sizes like a class name.
[quote=“applytobecome, post:7, topic:211341, full:true”]I could filter all of these if i want to?
Also how difficult is this ?
[/quote]
Yes you can filter those.
The techniques that are used differ, depending on if there will be 10 items, or 10,000 items to filter.
With numbers below 100 it can easily be done on the page with JavaScript.
Items over 1000 are better done by sending a request server side for processing.
Have you worked out what your maximum number of items to filter, will be?
With that many videos, having the full list of videos loaded to each and every visitor then filtered by JavaScript is infeasible.
I suggest instead that you store a list of the videos and their keywords server-side in a database, and query that database for the results that should be shown on the screen.
In other words, I don’t think that JavaScript is the solution that you’re looking for.
Although if you do use that it wouldn’t have anything to do with the original concept and would be for other purposes such as creating an endless scroll to match the search criteria.
No no not all in one page, i want pagination and when you tick off etc “fails” the pagination will shrink and and the videos of “fail” on the current page has to dissapear, if this makes sence ?