![]() I would therefore recommend this approach instead: $('#myTable tr:last').after('.') The approach you suggest is not guaranteed to give you the result you're looking for - what if you had a tbody for example: If I change the call to $('.edit-version').hide() call, it works, but that would affect other divs on the page that I don't want to affect. I've even tried calling css('display', 'none') without avail. No javascript errors come up, but the hide() and show() calls just don't modify the display property at all. I've verified that each returned item from $('.edit-version', host) is correct. It returns 3, indicating it's finding the three elements. I've verified that $('.edit-version', host).length is correct. I've verified that it's got the correct div ( #employee-card-49) is found, and is the right item, and is the only item with that id on the page. ![]() ![]() Here's the code: host = $('#employee-card-49') It finds the div that's hosting the form, and it hides the edit versions and displays the read only. The problem happens in the response from the server, which is passing back the opposite case. edit-version).īasically, the user clicks an edit link, and within the parent of that link, the read-only items are hidden and the edit items (inputs) are displayed. read-only) and show other elements (tagged with the class. I'm using jQuery to hide some elements on a form (tagged with the class. This is really strange, and I've been beating my head against it for hours now and can't figure it out.
0 Comments
Leave a Reply. |