Stuck with this issue for the past 2 days :-( Trying to create draggable sortable list with dynamically added groups. Was able to create containers, but divs cant be dropped to these containers.. Can somebody point out where I am doing it wrong, I know that it has to be assigned to a variable, even tried that, still now working.. Fiddle is as follows..
http://jsfiddle.net/Sullan/mLHJW/
if dynmmcally created elements not working try using on
in jquery version 1.7 . if you are using less than that , like 1.6 , 1.5 or something you can use live
example
$("p").on("click", function(){
alert( $(this).text() );
});
or
$("p").live("click", function(){
alert( $(this).text() );
});
insted of
$("p").click( function(){
alert( $(this).text() );
});
on
ad live
wil be added to the dynamically created elements
http://api.jquery.com/on/
http://api.jquery.com/live/
Just repeated the call within the button click.. not sure whether its the right way.. but works out fine...
http://jsfiddle.net/Sullan/mLHJW/1/
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With