// image recycle function
var trash_icon = '<a href="link/to/trash/script/when/we/have/js/off" title="Delete this image" class="ui-icon ui-icon-trash">Delete image</a>';
function recycleImage($item) {
// fade the item out
$item.fadeOut(function() {
// when the item is done fading remove the refresh icon
$item.find('a.ui-icon-refresh').remove();
// then set the width of the item
$item.css('width','96px')
//add the trash icon to the item in place of the recycle icon
.append(trash_icon)
//Then find the image and set the height on that
.find('img').css('height','72px')
//Back to the item and append it to the gallery
.end().appendTo($gallery)
//fade it back in
.fadeIn();
});
}
Предполагается, что ссылка на значок корзины является URL-адресом, который будет работать при отключении JavaScript. Идея заключается в том, что когда вы перетаскиваете объекты, а затем нажимаете на значки, вы, скорее всего, делаете ajax-запросы для сохранения этих действий на сервере. Те же самые действия должны быть доступны, когда у пользователей отключен JavaScript.