How Do I Make A Small jQuery Confirm Replacement?

Posted by Volomike on Stack Overflow See other posts from Stack Overflow or by Volomike
Published on 2010-03-09T06:09:27Z Indexed on 2010/03/09 6:21 UTC
Read the original article Hit count: 345

Filed under:
|
|

I have a table row with a Delete link on it for deleting that row. I want to create a jQuery feature that pops up above that Delete link an "Are you sure?" yes/no confirm dialog, but in a very small size.

How do I achieve this in the least lines of code in jQuery?

I mean, I need to determine the x,y of the Delete link that was detected from a click, and then move (and fadeIn()) a DIV into that location. If they click anywhere on that page except Yes on the yes/no, the thing does a fadeOut(). If they click Yes, then it deletes the row with a fadeOut() effect.

Note on this I don't need a modal screen dimmer, but the confirm needs to work modally.

(Items above that are bolded are something I don't exactly know how to do. Items bolded and italicized are important to what I need to do.)

I would think a widget like this would be critical to any Web 2.0 design, much like the Pines Notify feature seems essential.

© Stack Overflow or respective owner

Related posts about jQuery

Related posts about confirm