Batch upload pictures, modify the article to batch upload pictures listed, sometimes need to delete a certain picture, I write JS can only delete the last picture, do not understand why? The code is as follows
The following is a list of parsed images:
This is:
Reply to discussion (solution)
Yes, you're writing a single click to delete one.
Yes, you're writing a single click to delete one.
Can only delete the last picture, the front two can not be deleted, I get the image path can not get, click did not respond, do not know with last () this related?
Do you mean you can only click Delete on the right to be effective?
$ ("Img.button"). Last (). bind ("click", Del);
});
Switch
$ ("Img.button"). Bind ("click", Del);
});
Last () is the final one.
Do you mean you can only click Delete on the right to be effective?
$ ("Img.button"). Last (). bind ("click", Del);
});
Switch
$ ("Img.button"). Bind ("click", Del);
});
Last () is the final one.
That's right, that's the last () effect.