- This topic is empty.
March 5, 2013 at 10:58 pm #43180
My mind is turning to mush and Google isn’t helping me out on this one, perhaps I’m not describing what I want accurately.
Basically I want the contents of a single DIV to change based on which image someone clicks.Content Changes depending on which Link is clicked
If someone could help point me in the right direct.. i’d appreciate itMarch 5, 2013 at 11:33 pm #127138March 6, 2013 at 12:12 am #127139
I would like to show / hide content for each link.
For some reason in your example when I move my mouse out of the clickable area it reverts back to the original. I would like the new state to stay visable.March 6, 2013 at 12:29 am #127140March 6, 2013 at 12:36 am #127141
Thanks John, I’ll give it a shot :)March 6, 2013 at 12:38 am #127142
No problem! Are you just doing simple stuff like putting image descriptions or more complex content?March 6, 2013 at 12:59 am #127145
It’s for a biography page on my client’s site.
What they want is three photos , and when one photo is clicked the person’s bio appears beneath.
What you have works on codepen.. I have ZERO experience with JS or Jquery, how do I go about converting the JS column into a script ?
This is my [New Codepen](http://codepen.io/anon/pen/oDCmB)March 6, 2013 at 1:11 am #127147
Step 1 (Adding jQuery library)
Step 2 (Add your jquery code)
$('div').html('The text you are adding');
Nice use-case, you need anymore help man just reply.March 6, 2013 at 1:29 am #127150
And it’s actually for the mobile version of the site.
Here is the page: http://tomroof.com/tinymonster/about-us/
I have another question. Instead of rewriting the text inside the script, is there a way to call on a Custom Field slug’s text instead? IE
ID, ‘profile2’, true); ?>March 6, 2013 at 1:57 am #127152
I’m trying to get this to work in wordpress. Not sure I put the code in the header properly. Any suggestions? (Ignore the fact that the css messed up the rest of the page)
nvm, I found this article and seem to have gotten it working:
http://digwp.com/2009/06/including-jquery-in-wordpress-the-right-way/July 30, 2013 at 12:55 am #145128Historical Forums UserParticipant
if I want to target to another html file?January 21, 2014 at 3:34 am #160877mattbeeParticipant
@JoshBlackwood! I’ve been after a piece of code like this forever, thanks!
Just wondering now if you could add a sliding animation rather than it just abruptly disappearing?
I’ve tried incorporating .slideUp(), slideDown() and .slideToggle(). No luck though, ’cause I’m not the best with JS/jQuery.
Any help would be smashing!July 20, 2015 at 4:00 pm #205286timelessfilmsParticipant
Hey man. I am trying to use this code to load videos from Vimeo.
I tried using the iframe code on your codepen page instead of the text and it worked like a charm.
However when I try and apply it to my own page using the same code – it doesn’t do anything. I have checked and re-checked for errors but everything seems in place.
Might you have any idea why it just might not be functioning?
Thanks for your help!July 21, 2015 at 12:07 am #205298