I have a rather simple question for once. I have delete buttons that open modal pop ups to confirm or deny deletion. I would like these modal pop ups to fade in on click and fad
Use .fadeIn()
and .fadeOut()
on your id
parameter ("delAll1"
) not on this
.
function showModal(id) {
$("#" + id).fadeIn('slow');
}
function hideModal(id) {
$("#" + id).fadeOut('slow');
}
By using, $("#" + id)
you can select an element by its id
, that's "#" + id
.
See it here.
Note: Change from onLoad
to no wrap (head)
under framework on the left sidebar to fix the scope issue.