Share Posted January 14, 2020 Hello, how can i achieve multiple list divs? and it the items will drag only inside there own divs Thanks in advance! edit; please excuse my english. edit 2; what i want to achieve is have multiple <div id="list"></div> See the Pen dPZLEp by GreenSock (@GreenSock) on CodePen Link to comment Share on other sites More sharing options...
Share Posted January 14, 2020 Hey krx and welcome to the GreenSock forums! You can have multiple draggable sortable grids by changing the IDs to classes and then looping through each element, setting it up as necessary for your particular use case. Is there anything in particular that you're having trouble with? Link to comment Share on other sites More sharing options...
Author Share Posted January 14, 2020 4 minutes ago, ZachSaucier said: Hey krx and welcome to the GreenSock forums! You can have multiple draggable sortable grids by changing the IDs to classes and then looping through each element, setting it up as necessary for your particular use case. Is there anything in particular that you're having trouble with? Thanks for your response first of all, is there any chance you can update the codepen and send it here? Thank you. Link to comment Share on other sites More sharing options...
Share Posted January 14, 2020 Just now, krx said: is there any chance you can update the codepen and send it here? Sorry, we don't have the capacity to help with every request like this. If you run into particular issues feel free to ask us and we'll help where we can. Link to comment Share on other sites More sharing options...
Author Share Posted January 14, 2020 3 hours ago, ZachSaucier said: Sorry, we don't have the capacity to help with every request like this. If you run into particular issues feel free to ask us and we'll help where we can. Sorry to disturb again after i loop every class what should i put inside? i update `$list` and start `init()` but couldn't make it work Link to comment Share on other sites More sharing options...
Share Posted January 14, 2020 I don't understand your question. Also please understand that we can't help with every logical error in your project. Link to comment Share on other sites More sharing options...
Author Share Posted January 14, 2020 5 minutes ago, ZachSaucier said: I don't understand your question. Also please understand that we can't help with every logical error in your project. I'm looping all the classes that has the class `list`, but it always uses the second class. $('.list').each(function(i, obj) { window.$list = $(obj); window.tiles = $list[0].getElementsByClassName("tile"); init(); }); Link to comment Share on other sites More sharing options...
Author Share Posted January 15, 2020 Can anyone help me? Can you help @OSUblake ? Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now