Hi I'm fairly new to web development and am stuck at the very first project I have set myself.
I'm trying to create a team selection page where different team formations can be selected and the images will be dynamically ordered according to the selected formation.
I don't know if this can be achieved using CSS only, or whether I have to combine it with javascript or jquery (I'm trying to learn all 3 so it's a steep learning curve).
I think I can create a list in the html ul li, and then dynamically change the class of each li depending on the selected formation.
e.g. for soccer, formation 442 would have:
GK
DEF DEF DEF DEF
MID MID MID MID
STR STR
but if the formation was changed to 541 then the images would change to show
GK
DEF DEF DEF DEF DEF
MID MID MID MID
STR
Could anybody provide me with hints as to what possible solutions there are to this issue and I will read up further to try and understand.
e.g. do I need to create a javascript function for each formation type, give an id to each li element and set the CSS for each element depending on the selected formation
e.g do I use jquery to add CSS class to each li element depending on selected formation