Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6614919
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T20:23:51+00:00 2026-05-25T20:23:51+00:00

If I specify the accept option for a droppable that is also draggable this

  • 0

If I specify the accept option for a droppable that is also draggable this breaks the draggable behavior of that droppable.

To prevent nesting of these draggable droppables, I specify the accept option to be only the class that belongs in the droppable. I do this with $('div.link_drop_box', $('#'+card_id)).droppable({ accept: '.link' });. Here is the javascript where I specify the droppable draggable div.

    // Define more LinkCard options
    $('#'+card_id).css('width',350);
    $('#'+card_id).css('height',250);
    $('#'+card_id).resizable();
    $('#'+card_id).draggable();
    $('#'+card_id).draggable("option", "handle", '.linkcard_header');
    $('#'+card_id+' p').editableText();
    $('#'+card_id).draggable({ stop: function(event, ui) { update_linkcard_xml(card_id) } });

    // Make droppable
    $('div.link_drop_box', $('#'+card_id)).droppable({ accept: '.link' });
    $('div.link_drop_box', $('#'+card_id)).droppable({
        drop: function( event, ui ) {
            var $item = ui.draggable;
            $item.fadeOut(function() {

            $item.css( {"left":"", "top":"", "bottom":"", "right":"" }).fadeIn();
        }); 
        $item.appendTo( this );
        }
    });

Now the droppable divs aren’t draggable anymore. The strange behavior is that there are several such droppable divs. The first one is still draggable, the the others are not. What could cause the accept option to break the draggable behavior.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T20:23:51+00:00Added an answer on May 25, 2026 at 8:23 pm

    Found the problem. Should put all the options in one droppable Method. The following works.

        $('div.link_drop_box', $('#'+card_id)).droppable({
           drop: function( event, ui ) {
              var $item = ui.draggable;
              $item.fadeOut(function() {
                 $item.css( {"left":"", "top":"", "bottom":"", "right":"" }).fadeIn();
              }); 
              $item.appendTo( this );
              /* update_links_xml("card_id"); */
           },
           out: function( event, ui ) {
              /* update_links_xml("card_id"); */ 
           },
           accept: ".link",
         });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

How can I specify that a CharField of max_length 5 can only accept numerical
I´ve read that it´s possible to share sockets between processes. Is this also possible
Do I need to specify in my request that I wish to accept gzip,
How do you specify that a foreign key constraint should be a 1:1 relationship
XAML allows you to specify an attribute value using a string that contains curly
Is it possible to specify a Java classpath that includes a JAR file contained
The HTTP Accept header can specify priority using the q specifier, such as application/xml;q=0.8
I have a small one sided message sender that works while I specify the
I want to specify a regex that finds if there are any non letter
I have a method, that should accept maximum 2 arguments. Its code is like

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.