javascript - attr. ID only works once, despite different IDs -
this site: http://marmiteontoast.co.uk/fyp/login-register/register-username-builder.php
when drag tile right , drop in coloured box, adds id droppable (try , see).
this works fine number 1. tile , box, rest of them... nothing. no id added.
this code adding of id "droppedone" works fine:
$( ".slot.one" ).droppable({ drop: function(event, ui) { ui.draggable.attr('id', 'droppedone'); $(".save.one").fadein("fast"); } });
id's unique html elements
ui.draggable.attr('id', 'droppedone');
will need use class instead, changing to:
ui.draggable.addclass("dropped");
Comments
Post a Comment