I need to create a football field and then have some sort of dropdown menu that chooses formations (like 4-4-2, 4-5-1 etc) and moves my players (more like circles with number/name) on that field to achieve the desired formation.
Any ideas on how should I begin ?
Like cfv1000 said, you should look into draggable & droppable in jQuery UI.
Here's a head start I made for you. It's not near complete.
With your identifiers for your element(s), just call draggable()
like this:
$("#GKRedTeam").draggable();
$("#GKBlueTeam").draggable();
..and amongst many upcoming additions - set up proper HTML & CSS properties for it.
JsFiddle demo
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With