I am using html and js, and I want to display a chunk of html code if the user clicks something. The code is a bit big so using document.getElementById("display").innerHTML = is not attractive. I googled and found out about IFrame, but I want to avoid scroll bars and stuff, I hoped I could use a simple div, how can I do that? I am using jquery as well, I know about the hide() function in jquery, but the thing is that the stuff in the div with id display should change dynamically, so if the user clicks item1 he should get text1, item2 should get text2, and i want to have a specific place for textx
I am using html and js, and I want to display a chunk of
Share
It sounds like you’re looking for something like
This will toggle the element with the ID specified by the
rel=attribute of each element with theShowLinkclass.For example: