Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Link Inside Sortable Element #13

Closed
MatrixMediaSrl opened this issue May 8, 2020 · 5 comments
Closed

Link Inside Sortable Element #13

MatrixMediaSrl opened this issue May 8, 2020 · 5 comments

Comments

@MatrixMediaSrl
Copy link

Hello,
congratulations for the script, very useful !!!

unfortunately I have found this problem, I have not found a way to insert a link, inside one or more sortable elements.

Tips?
regards

@gardiner
Copy link
Owner

Hi, what exactly does not work? I suspect that the mouse event handling collides with the default anchor-mouse-handling, but without more details I can only guess...

Cheers, Ole.

@MatrixMediaSrl
Copy link
Author

Hi,
Thanks for the reply.

I created a simple sortable list:

<ul>
<li>Hello click <a href="#url1">here</a></li>
<li>Hello click <a href="#url2">here</a></li>
<li>Hello click <a href="#url3">here</a></li>
<li>Hello click <a href="#url4">here</a></li>
</ul>

when I click on the link, the "sortable" function is "activated" and the link is unusable.

If I remember correctly, jqueryUI, to solve this problem, used the option: helper : clone

Thanks for the attention
Regards

@gardiner
Copy link
Owner

Hi, draganddrop has an option handle which accepts a selector specifying what elements should react to drag and drop events, e.g. handle: '.sorthandle'. You could then modify your markup like this:

<li><span class="sorthandle">Hello click</span> <a href="#url1">here</a></li>

I haven't tried it yet, though, please let me know if you need further help. Cheers.

@MatrixMediaSrl
Copy link
Author

sorry, sorry, sorry ...
... I have not seen this option !!!

I set the option and now everything works perfectly !!!

Thanks so much!!!
Best Regards!!!

@gardiner
Copy link
Owner

Great :) Cheers!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants