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 7967369
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T06:40:41+00:00 2026-06-04T06:40:41+00:00

Since I’m using jQuery UI’s sortable extension nestedSortable I’m trying to accomplish to create

  • 0

Since I’m using jQuery UI’s sortable extension nestedSortable I’m trying to accomplish to create multiple (connected) lists with each having their seperate option in maximum nested levels.
But the plug-in checks for the amount of maximum levels in the original item (being dragged) instead of the place where it is supposed to be dropped.

<script type="text/javascript"> 
_isAllowed: function(parentItem, levels) {
    var o = this.options;
    // Are we trying to nest under a no-nest or are we nesting too deep?
    if (parentItem == null || !(parentItem.hasClass(o.disableNesting))) {
        if (o.maxLevels < levels && o.maxLevels != 0) {
            this.placeholder.addClass(o.errorClass);
            this.beyondMaxLevels = levels - o.maxLevels;
        } else {
            this.placeholder.removeClass(o.errorClass);
            this.beyondMaxLevels = 0;
        }
    } else {
        this.placeholder.addClass(o.errorClass);
        if (o.maxLevels < levels && o.maxLevels != 0) {
            this.beyondMaxLevels = levels - o.maxLevels;
        } else {
            this.beyondMaxLevels = 1;
        }
    }
}
</script>

How am I able to make this part of the plug-in select the maxLevel option of the location where the item is being dropped?

  • 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-06-04T06:40:42+00:00Added an answer on June 4, 2026 at 6:40 am

    I did a quick (dirty) fix to solve to problem:

    <script type="text/javascript"> 
    _isAllowed: function(parentItem, levels) {
        var o = this.options;
        o.maxLevels=$(this.placeholder[0]).closest('.ui-sortable').nestedSortable("option","maxLevels");
    </script>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Since visual studio added support for JQuery, I am wondering how to create a
Since I am new to using Unity 2.0, I need some pointer or suggestion
Since it's impossible to capture text from a java canvas by using standard Windows
Since the pages are stored in address_space within each inode, how does the background
Since all the examples in the guide are with lists, I find it difficult
Since MySQL ignores check constraints, how does one go about using a trigger to
Since I started using Fireworks CS5.1, and it doesn't matter how I write the
Since Objective-C is basically an extension of C, Does the code get converted to
Since I'm using Java 1.4.2, this means that I cannot use Java's implementation of
since this morning I keep getting this error when trying to launch my MVC

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.