Coder Social home page Coder Social logo

Dynamically Add Items about nestedsortable HOT 6 OPEN

ilikenwf avatar ilikenwf commented on July 18, 2024
Dynamically Add Items

from nestedsortable.

Comments (6)

kthornbloom avatar kthornbloom commented on July 18, 2024

Also interested in this. I figured simply calling the function again would do the trick, but then I just get a bazillion "Uncaught TypeError: Cannot read property 'left' of undefined" errors as I try to drag.

Edit- seems to be jQuery UI that's not updating rather than the plugin. Not sure of the solution for that.

from nestedsortable.

Claud avatar Claud commented on July 18, 2024

Exemple:

$('#addNode').click(function(){
                $('ol.sortable').append('<li id="item-' + (new Date()).getTime() + '"><div>Новыей элемент</div></li>');
                $('ol.sortable').nestedSortable('refresh');
            });

from nestedsortable.

kthornbloom avatar kthornbloom commented on July 18, 2024

Yes, that works. Would be nice if that were added into the documentation!

from nestedsortable.

phena109 avatar phena109 commented on July 18, 2024

As far as I have used the plugin, we can simply insert the html and it will display fine (with some display glitch). No need to refresh.

(maybe we are talking about different version, I use the 2.0alpha)

from nestedsortable.

actorius avatar actorius commented on July 18, 2024

Claud, not working you solution. Classes does not applyed until item is not be changed or moved.

from nestedsortable.

illmaren avatar illmaren commented on July 18, 2024

Change a bit (so that the menuItem will be added like in the example but it can´t be deleted...any tipps?

from nestedsortable.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.