jQuery events to new created div

Stefan

A visitor could drag and drop different items to multiple containers which have an individual sortable so the items in each container could be changed. At last, every container could be resized. So, this is all working well.

Unfortunately a problem occurred when the visiter create a newly div which is an container. This container should have the same opportunities as the containers which loading while the page loads. But since the container is newly added to the page, the functions aren't working.

I've tried different things like appendTo() and call the functions draggable(), resizable() etc again, but al doesn't working.

Thomas

It should work if you do something like this, event will be applied to new elements :

$('span').on('resize', function() { ... }); // or whatever event 'click', 'mousedown'..

var label = $(document.createElement('span'));

td.append(label);

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

Div tag events in jquery

From Dev

Div tag events in jquery

From Dev

Adding events to dynamically created checkbox in jquery mobile

From Dev

Jquery clone div breaking events

From Dev

jQuery alert if new cookie is created?

From Dev

jQuery appending to a dynamically created div

From Dev

jQuery appending to a dynamically created div

From Dev

Rendering new div created dynamically with Meteor

From Dev

.wrap() jQuery-Created Button in jQuery-Created <div>

From Dev

Cloning a jQuery object with events bound to the new object

From Dev

How to bind events to a newly created SVG element using jQuery?

From Dev

How To Access Dynamically Created Page Elements with jQuery (not events, ELEMENTS!)

From Dev

Change background-colour of div for each new div created

From Dev

Removing div created from PHP using jQuery

From Dev

Jquery, remove created div if outside screen width

From Dev

Validating dynamically created div using jquery

From Dev

Create a new div using jQuery

From Dev

jQuery - Making new div on interval

From Dev

Put input in new div in jQuery

From Dev

Create a new div using jQuery

From Dev

jQuery - Making new div on interval

From Dev

How to wait for a group of events to finish before starting a new one with jquery?

From Dev

jQuery .on with multiple events, multiple handlers and applying to new elements

From Dev

Returning false from custom events produces error in new jquery version

From Dev

Is there a limit to the number of created events?

From Dev

jquery emptying parent div does not delete events why

From Dev

jquery emptying parent div does not delete events why

From Dev

Click event for new element created from jquery post

From Dev

jQuery new buttons have been created, but will not get erased

Related Related

  1. 1

    Div tag events in jquery

  2. 2

    Div tag events in jquery

  3. 3

    Adding events to dynamically created checkbox in jquery mobile

  4. 4

    Jquery clone div breaking events

  5. 5

    jQuery alert if new cookie is created?

  6. 6

    jQuery appending to a dynamically created div

  7. 7

    jQuery appending to a dynamically created div

  8. 8

    Rendering new div created dynamically with Meteor

  9. 9

    .wrap() jQuery-Created Button in jQuery-Created <div>

  10. 10

    Cloning a jQuery object with events bound to the new object

  11. 11

    How to bind events to a newly created SVG element using jQuery?

  12. 12

    How To Access Dynamically Created Page Elements with jQuery (not events, ELEMENTS!)

  13. 13

    Change background-colour of div for each new div created

  14. 14

    Removing div created from PHP using jQuery

  15. 15

    Jquery, remove created div if outside screen width

  16. 16

    Validating dynamically created div using jquery

  17. 17

    Create a new div using jQuery

  18. 18

    jQuery - Making new div on interval

  19. 19

    Put input in new div in jQuery

  20. 20

    Create a new div using jQuery

  21. 21

    jQuery - Making new div on interval

  22. 22

    How to wait for a group of events to finish before starting a new one with jquery?

  23. 23

    jQuery .on with multiple events, multiple handlers and applying to new elements

  24. 24

    Returning false from custom events produces error in new jquery version

  25. 25

    Is there a limit to the number of created events?

  26. 26

    jquery emptying parent div does not delete events why

  27. 27

    jquery emptying parent div does not delete events why

  28. 28

    Click event for new element created from jquery post

  29. 29

    jQuery new buttons have been created, but will not get erased

HotTag

Archive