AshesOfOwls / jquery.shapeshift

A dynamic grid system with drag and drop functionality.
http://ashesofowls.github.com/jquery.shapeshift/
MIT License
1.67k stars 311 forks source link

shapeshift dynamic load, trash, and drug area #61

Open nliapis opened 11 years ago

nliapis commented 11 years ago

Hello,i start learning jquery and i am trying to use shapeshift in a project.

I have 3 questions and i need your help please.

  1. I want to dynamic load li in my ul. when a new li added in my list it stuck in the top and over the other li. how i can sent the new li in the end of the list.
  2. I am trying to use the trash but i can t. I read your example but i see that trush is working only when a div goes out form his parent. can i use trush with an ul?
  3. can i limit the drug area for the elements? i mean that now i can drug something in x and it goes out of page.
jackmarketon commented 11 years ago

Can you share some of your code for #1? You should be able to append the li's to the list depending on what jQuery you are using

2 The trash has to be setup on another element (you could use an ul but a div would be better). Code example should help so we could point out what you are doing wrong. You need to create two different shapeshifts one of which has trash enabled.

3 No, not without writing your own code to limit the mouse movement when dragging occurs.

AshesOfOwls commented 11 years ago

For #1 you will have to destroy shapeshift and then reinitialize it, such as:

$(".container").trigger("ss-destroy")
$(".container").shapeshift()

It is an unfortunate workaround but I promise 3.0 will have a much much much better way of handling the addition of new items.

Jack was correct with the other two. You can add code to issues by wrapping it in the ` keys, which is explained more in the github flavored markdown pages.

nliapis commented 11 years ago

nice thank you i will try it

AshesOfOwls commented 11 years ago

Do you mean actual code that can run? Github can only display the code but there is also the option of jsFiddle which allows you to create simple demos that you can share.

AshesOfOwls commented 11 years ago

Check out this part of the syntax page