scrupul0us;10921507 wrote:nogdog:
it might be prudent to also show an example using the visible css property as removing/inserting content is a bulky operation if lets say you are manipulating large content or navigation panes
albeit this isnt the JS section, but, as it appears this member is new to programming, its not a good idea to imply that this is the only way to do it
just food for thought
As the Perl community likes to say, TMTOWTDI. It all really depends on the actual desired functionality: Do you want the entire HTML element in question to disappear, which may cause the rest of the page from that point forward to have to be redrawn, or do you want to just have the text change (in this case from a word to a place-holder space) so that there is no change to the layout (which is what I was trying to do, for no particular reason other than I felt like it), or is there some other functionality/effect that is wanted here and which I have not thought of, perhaps even something that would recommend using a server-side PHP approach.
Your point is certainly valid in that my solution is not necessarily the "right" or "best" solution, only "a" solution. For a fairly trivial exercise like this example, there are probably dozens of specific ways to do it, though some/many may be pretty sub-optimal.