Now instead of multiple Id's all the same you have numeric ID's. ID's can't start with numbers. Adding onclick to your markup is moving backwards with jQuery. Currently your hide function is not available in the DOM for onclick's as it is closed within jQuery and therefore is not a global function. You seem stuck on needing to use ID's when it's not necessary. Had you changed to class="someDivClass" instead of ID="hide" could easily do : $("div.someDivClass a").live('click',function() { // use live() due to elements won't be in DOM when page loads $(this).parent("div.hide").hide(); }); This will cover all of the divs that get created and you want to be able to hide. If you want to delete them, use remove() instead of hide(). You also have a function die() that is undefined and throwing an error Jerry Johnson wrote: bump |
- [jQuery] Hide chat content Jerry Johnson
- [jQuery] Re: Hide chat content Jerry Johnson
- [jQuery] Re: Hide chat content Scott Sauyet
- Re: [jQuery] Re: Hide chat content Jerry Johnson
- Re: [jQuery] Re: Hide chat content Charlie
- Re: [jQuery] Re: Hide chat content Jerry Johnson
- [jQuery] Re: Hide chat content Jerry Johnson
- Re: [jQuery] Re: Hide chat content Charlie
- Re: [jQuery] Re: Hide chat con... Jerry Johnson
- [jQuery] Re: Hide chat content Scott Sauyet
- Re: [jQuery] Re: Hide chat con... Jerry Johnson
- [jQuery] Re: Hide chat content Scott Sauyet