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

  • SEARCH
  • Home
  • 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 3978948
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T05:06:36+00:00 2026-05-20T05:06:36+00:00

Another question relating to jQuery UI Nested Sortable 1.2.1 . We call the function

  • 0

Another question relating to jQuery UI Nested Sortable 1.2.1.

We call the function like this:

$(document).ready(function(){
$('ol.sortable').nestedSortable({
disableNesting: 'no-nest',
forcePlaceholderSize: true,
handle: 'div',
items: 'li',
opacity: .6,
placeholder: 'placeholder',
tabSize: 25,
tolerance: 'pointer',
toleranceElement: '> div'
});

I was thinking how can I send additional information through this, like:

$(document).ready(function(){
$('ol.sortable').nestedSortable({
disableNesting: 'no-nest',
forcePlaceholderSize: true,
handle: 'div',
items: 'li',
left_val: '<?=$lft?>',
root_id: '<?=$id?>', 
opacity: .6,
placeholder: 'placeholder',
tabSize: 25,
tolerance: 'pointer',
toleranceElement: '> div'
});

Idea is to use the three variables, left_val, root_id and holder in the following fashion in the toArray function.

var left = this.left_val;
var root_id = this.root_id;

This is not working, of course. Values are coming out as NaN, NaN and undefined.

Doing an alert(left+' '+root_id); just below var left = this.left_val; var root_id = this.root_id; is giving me an alert stating undefined undefined

The options of options are coming from the parent plugin jQuery UI.

Just wondering if anyone can throw light to this, please.

EDIT:

I tried a different trick. I tried to send the left and root_id values through <ol class="sortable" title="<?=$lft?>|<?=$id?>"> and then in the js page, I tried

if ($(this).parent().attr('class') == 'sortable') {
var idArray = $(this).parent().attr('title').split("|");
} 

But I’m getting $(this).parent().attr('class') as undefined on alert.

  • 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-20T05:06:36+00:00Added an answer on May 20, 2026 at 5:06 am

    This is finally solved with:

    var idArray =$(this.element).closest("ol.sortable").attr('title').split("|");
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Another question related to this one . I have a List<SortableObjects> that is the
This question is kind of related to another question but I have a specific
Relating to this question i was wondering if .NET has any libs (or a
I'm aware of several question on this forum relating to this. But I'm not
Another question on StackOverflow is asking how this is done, but the general question
Another question asked about attributes, but I would like to extend the question to
Another question says that git pull is like a git fetch + git merge
Another question following on from this thread . The only remaining item that I
In another question I asked about alignment this was given to me to answer
EDIT: declaring them private was a typo, I fixed it: Relating to another question,

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.