javascript - Change items style when moving elements in jquery-ui sortable -


I have two columns, which are jquery-UI sortable, items are selected in the left column, not everyone in the right goes. You can move the objects ( li elements) between the two, each element can be either in the left or right column. The first element in the left column (selected) is not sorted and can not be moved (name id). Elements have different styles in the left column as elements in the right column, each li element in the left column is itself on the line, but they are running in the right column.

Here's an image:

Enter image details here

Everything is working fine, but when the element is growing among the user columns, then I need to change the style of the element (while the moving = left mouse button is down), when left Or on the right column, by changing my style, I mean, when F.E. I am starting moving the element telephone from left to right, when I am more than the right column, this element should change its background color to gray and not be displayed in the entire line, But its width and ad vice versa.

I can not understand how this can be done. Thank you.

You can add it to your sorted options:

  over : Function (Event, UI) {if ($ (ui.item) .closest ("ul") Haclass ("Interest")} {$ (ui.item) .detach () AppendTo ("# categories-source"); $ (Ui.item). CSS ("width", "initial"); } And {$ (ui.item) .detach () AppendTo ("#Cert -Select"); $ (Ui.item). CSS ("width", "210px"); $ (Ui.item). CSS ("height", "initial"); }}  

This right pull depends on the element ul if interest of the previous category.

Update

Also set the appropriate dimensions for the elements that drag (because the left list is one per line).


Comments

Popular posts from this blog

python - Overriding the save method in Django ModelForm -

html - CSS autoheight, but fit content to height of div -

qt - How to prevent QAudioInput from automatically boosting the master volume to 100%? -