foreach($photos as $photo) {
$lastChild = "";
if( $count%3 == 0 && $count != 0 )
echo "</tr><tr>";
$count++;
?> <td>
<a href="<?php echo ($photo['source'])?>" title="<?php echo ($photo['name'])?>">
<img id="thumb" class="thumb" src="<?php echo ($photo['picture'])?>">
</a></td>
This is the script for draggable. Ive done this but it still does not work
only the first one
does the foreach loop affects?
$thumb.draggable({
revert: "invalid", // when not dropped, the item will revert back to its initial position
helper: "clone",
});
im unable to set ui-draggable to all the img src other than the first img.
any one can help?
Use
instead of
in your PHP and
instead of
in your jQuery. This should fix it.
If you absolutely need IDs on the images for any reason, make them unique like this: