views:

70

answers:

1

I would like to know how the recycle image link works,

it points to the following url

link/to/trash/script/when/we/have/js/off

what exactly is this doing?

+1  A: 
// 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();
    });
}

The href of the trash icon is suppose to be a url that will work when javascript is turned off. The idea is that when you dragging things around and then clicking on the icons that you are most likely making ajax requests to save those actions on the server. Those same actions should be available when users have javascript turned off.

PetersenDidIt
Thanks!Can you explain how this link'<a href="link/to/trash/script/when/we/have/js/off"works
Updated the answer with a short description of the href of the trash icon
PetersenDidIt