I have a set of records with an "edit" button next to them. I also have a div that has a form inside of it.
when I click on "edit" I show the div. Inside the div, I have a "close" button which simply closes the div via jquery.hide(). when I then click the "edit" button for another record, the div does not get displayed at all.
I use other show and hide within my code for other elements and they work quite fine. Only this one I can't get working.
Is there a specific usage of the show() and hide() methods in my case ?
$('.edit').live('click', function() {
var theid = $(this).attr('id');
$('#' + theid).empty().append($('.rec_edit').show());
if ($('#txt_nowediting_id').val() > 0) {
load_single_rec($('#txt_nowediting_id').val());
};
$('#txt_nowediting_id').val(theid);
return false;
});
$('#btnCancelEdit').click(function() {
$('.rec_edit').hide();
load_single_rec($('#txt_nowediting_id').val());
return false;
});
here .rec_edit is the div that gets hidden and shown...