Unable to allocate a second item to an existing one

Encountering an unusual issue while trying to assign an item a second time.

Initial scenario: I am working with a jqxTree containing various items as shown below:

- apple
- oracle
- microsoft

When I drag and drop one item into another, the structure looks like this:

-apple
|-microsoft
-oracle

The above operation works well. Now, my goal is to copy the item (microsoft) and assign the copy to apple, while keeping the original in its original position.

I have made some modifications to the sample code 'drag and drop' from :

$('#treeA').jqxTree({ allowDrag: true, allowDrop: true, height: '300px', width: '220px', 
        dragEnd: function (item, dropItem, args, dropPosition, tree) {
            $('#treeA').jqxTree('addTo', dropItem, item, true);
            return false;
        }
    });

Everything seems to be functioning correctly up until the point where I try dragging the microsoft item for a second time and realize that the value item becomes null.

Any suggestions would be greatly appreciated. Thank you in advance.

EDIT 1:

For a working example, please refer to the jsFiddle link below:

http://jsfiddle.net/mtcj7v5r/

Answer №1

After seeking advice from the developer forum, I received this response:

Greetings,

Regrettably, jqxTree does not support the implementation of calling addTo in the dragEnd callback as it interferes with proper rendering of the widget.

Warm regards, Dimitar

The jQWidgets team can be reached at

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

Issue with the read more button inoperative for two specific paragraphs

Upon trying to implement 2 or more "Read More" buttons on my website for users to view snippets of content before downloading, I encountered an issue with the functionality only working on the first paragraph and not the subsequent ones. Despite ...

I need to see the image named tree.png

Could someone assist me in identifying the issue with this code that only displays the same image, tree.png, three times? var bankImages = ["troyano", "backup", "tree"]; jQuery.each( bankImages, function( i, val ) { $('#imagesCon ...

Converting an array into an object using Typescript and Angular

I have a service that connects to a backend API and receives data in the form of comma-separated lines of text. These lines represent attributes in a TypeScript class I've defined called TopTalker: export class TopTalker { constructor( pu ...

When it comes to identifying a click outside of an element, the Jquery or Javascript function may encounter some challenges specifically with Internet Explorer

After reviewing various solutions online, I noticed that they all function properly on Chrome and Firefox but encounter issues with Internet Explorer when interacting with an SVG. For instance, consider the following code snippet: $(document).on("click",( ...

Unleashing the potential of extracting the value of a subsequent iteration while within the

Currently, I am facing a dilemma as I am unable to comprehend the logic required to design this algorithm. The problem at hand involves a sequence of images with arrows placed alternatively between each image. The structure appears as follows: Image -> ...

Is the file corrupt using node.js?

Looking for ways to determine if a file is corrupted using node.js? I have attempted various File System methods, such as fs.readFile, fs.open, and fs.access, but all of them are showing an OK status. However, I am confident that my file is corrupted base ...

the typeahead.js method in Twitter's process() function is filling the list with undefined values

I am encountering a similar issue as described in the thread Twitter Typeahead Ajax results undefined. Since that problem remains unresolved, I am revisiting the topic with hopes of shedding light on any missing details. My setup includes standalone Typea ...

Issue encountered: Unable to fetch username and password from request

Currently, I am developing a login and registration system. However, when I input the correct details in my register Post method, the request remains pending and I cannot identify the error. The specific error message it presents is data and salt arguments ...

"Enhance your Vue 3 experience with a stylish Instagram Feed featuring

Struggling to retrieve the most recent Instagram posts from a feed using Vue 3 and Axios due to Instagram's strict-origin-when-cross-origin policy causing constant blocks. All access tokens are properly configured. The Instagram Basic Display API gui ...

Executing a Javascript function when a form is submitted

function validateForm() { alert("Form submitted successfully"); return true; } <form onsubmit="return validateForm()" action="add.php" method="post" id="p1"> <center>Add New Survey</center> <p>&nbsp;&l ...

What is preventing this setTimeout from triggering?

My experience with Knockout js has left me puzzled, as I seem to be missing a key concept. Despite no error messages, it's challenging for me to pinpoint where exactly the issue lies. All I want is to periodically fetch data and update my table using ...

Tips for retrieving the most recent number dynamically in a separate component without needing to refresh the page

Utilizing both the Helloworld and New components, we aim to store a value in localStorage using the former and display it using the latter. Despite attempts to retrieve this data via computed properties, the need for manual refreshing persists. To explore ...

Create a JavaScript button that redirects to a different page within a React application

I am creating a div element using a for-loop and I want to link each div to the "/campaign" page with its respective id. When a div is clicked, I want it to navigate to the "/campaign/id" page and pass the id to the Campaign component. class Home extends ...

Preventing Broken URLs in Jquery each

What is the best way to prevent taking images with broken URLs? jQuery.each(jQuery('img'), function(index, obj) { imageStack.add(jQuery(obj)); }); ...

Ensure success when utilizing laravel's ORM for deletion

I have a table set up with a link to delete specific tasks @foreach ($tasks as $task) <tr> <td>{{$task->id}}</td> <td>{{$task->name}}</td> <td><a href="javascript:void( ...

Determining if a checkbox is checked through a click event

Is the checkbox checked when clicked? $('body').on('click','.beach_access,.parks,.neighborhood_parks',function(e){ if($(this).is(":checked")){ alert("The checkbox is checked."); } ...

Django getJSON with jQuery causing sessionid cookie mismatch

Encountering a problem with getJSON where it is sending an incorrect value for Django's sessionid cookie. There is an API operating on port 8000. When accessing this URL: http://localhost:8000/api/accounts/banner, it returns a JSON document if there ...

Trouble with ng-repeat when working with nested json data

Check out this app demo: http://jsfiddle.net/TR4WC/2/ I feel like I might be overlooking something. I had to loop twice to access the 2nd array. <li ng-repeat="order in orders"> <span ng-repeat="sales in order.sales> {{sales.sales ...

Implementing ASP MVC3 - Utilizing partial views to dynamically add new HTML elements to the webpage

Currently, I have implemented an Ajax call in my ASP MVC3 view to add a new list item to the page dynamically. The process involves making an Ajax call from the view to a controller action that returns a partial view. The jQuery script is then set to use t ...

After the decimal point, there are two digits

My input field is disabled, where the result should be displayed as a product of "Quantity" and "Price" columns ("Quantity" * "Price" = "Total"). However, I am facing an issue where the result often displays more than 2 digits (for example: 3 * 2.93), desp ...