javascript - Change dragging object and restore it after dropping it -


Please help me, I know how to use draggable and doppable classes, but I have no way to get it It can be found:

I have a large image that I need to pull and drop.

1) Instead of roaming around a large-sized image By dragging, I want to use a small-sized image (I already have it, just change the bus. Rurt the src).

2) Once reaching the target div, I would like to hide the image of that drag and would like to show the large image again in its original location.

The only restriction is: "Return: invalid" should apply.

This is my code:

  $ ("# big_img"). Change the large image with draggable ({back: 'invalid', drag: function (e, ui) {//} with a small version of this small ($) .attr ("src"). Replacement ("/ large /", "/ Small /"); // <- this does not do anything}}); $ ("#target") Droppable ({drop: function (e, ui) {warning ("was added"); // & lt; - there is no problem here. // restore big_img}});  

Thanks.

I think I have solved it: instead of using "help", I Instead I can get another image to use:

  $ ("# big_img"). Replacement ("/ large", "/ small /") + "'/ />" );});  

I just need to focus the mouse cursor, but I think there will be no problem. Then, removing the dropped element will not be a problem. Therefore, I will not need to restore the image because it does not really move. :)

If you have any other options, I would love to read it.


Comments

Popular posts from this blog

sql - dynamically varied number of conditions in the 'where' statement using LINQ -

asp.net mvc - Dynamically Generated Ajax.BeginForm -

Debug on symbian -