vishalok12 / jquery-dragarrange

A Basic jQuery library to arrange/order DOM elements by dragging http://vishalok12.github.io/jquery-dragarrange/
MIT License
40 stars 18 forks source link

Css issue whe draggin from a structure #2

Closed CaptainMad closed 9 years ago

CaptainMad commented 9 years ago

Hi there Using the dragarrange plugin, I notice a problem when the div element-container is in a table structure. see the effect here : http://www.fcpartner.com/demo_drag.html I guess the proble is in the line 195 : position: 'absolute',

Looking forward reading from you guys :!

vishalok12 commented 9 years ago

Hi CaptainMad, First, thanks for notifying the issue. I will look for the issue in weekend. If you have already fixed it, i will be more happy to merge your pull request :-)

CaptainMad commented 9 years ago

Unfortunately I haven't fixed it yet but tested several tricks without success. Quick hint : on Chrome, using F12 facilities, if you unselect the Position : Absolute of the moving div, you get strange behavour of the moving div ... good luck !

vishalok12 commented 9 years ago

@CaptainMad It seems to be an issue. For the time being, you can fix it by assigning parent element with style as "position: relative". That will solve the issue.

CaptainMad commented 9 years ago

Thanks Works fine putting "position: relative" style to the div elements-container.

CaptainMad commented 9 years ago

By the way, I can't get the $.ajax running to save new position. I put it there line 253 : if (hoveredElementIndex < dragElementIndex) { $(hoveredElement).before($dragElement); $.ajax({ url: 'MyProg.php', data: {positions: 'iconswap|' + hoveredElement.id + '|' + $dragElement[0].id}, type: 'get' }); ... Any idea ?

CaptainMad commented 9 years ago

of course Ids are appropriately populated... the call is not performed to MyProg ... why ?

vishalok12 commented 9 years ago

Hi @CaptainMad, Sorry for my late response first. Have you solved your issue?

It seems, might be you're getting an error in your ajax call. It would be best to debug your code to clearly find the mistake.