| This board has been archived and is no longer accepting new questions. If you have a support question for your ZetaBoard, please visit us at the new support board. Registration is free and easy. Visit the NEW ZetaBoards Support forum! |
| Swap Text help | |
|---|---|
| Tweet Topic Started: May 27 2008, 08:50 PM (598 Views) | |
| carastir | May 27 2008, 08:50 PM Post #1 |
|
Did you say something?
![]() ![]() ![]() ![]() ![]()
|
yeah, yeah, I know it is Javascript, but It's the only thing I know. I am having trouble formatting the text to fit my needs.
I want to have HTML in the 'This changes' Area. How do I do this? Or can you give me a better code to do this with? EDIT: I'm obviously very rusty with Javascript.
Edited by carastir, May 29 2008, 05:59 PM.
|
![]() |
|
| RyuraGS | May 28 2008, 06:32 AM Post #2 |
![]()
Member
![]() ![]() ![]() ![]() ![]()
|
I'm going to assume you're on a ZetaBoard while doing this. First change this: <a href="http://rpg.divinusdies.net" onmouseover="MM_setTextOfTextfield('text','','This changes')"> To this: <a href="http://rpg.divinusdies.net" id="mouse_em_up"> Now your script: $(function() { var x = $("#mouse_em_up").text(); $("#mouse_em_up").hover(function() { $(this).text("This Changes"); },function() { $(this).text(x); }); }); |
![]() |
|
| carastir | May 28 2008, 05:09 PM Post #3 |
|
Did you say something?
![]() ![]() ![]() ![]() ![]()
|
Thank you, but I also want to have more than one of these, so, a series of links that also change the text. (Not all the same.) Thanks. |
![]() |
|
| RyuraGS | May 28 2008, 05:27 PM Post #4 |
![]()
Member
![]() ![]() ![]() ![]() ![]()
|
Still simple, give them all a class of hover_on_this or whatever you want, and make their title the text to switch to. Then do this:
Untested but it should work. Edited by RyuraGS, May 28 2008, 05:27 PM.
|
![]() |
|
| carastir | May 28 2008, 06:10 PM Post #5 |
|
Did you say something?
![]() ![]() ![]() ![]() ![]()
|
<a href="http://rpg.divinusdies.net"> with the text:
How would that look? |
![]() |
|
| RyuraGS | May 28 2008, 06:34 PM Post #6 |
![]()
Member
![]() ![]() ![]() ![]() ![]()
|
Just add a title attribute with the new text you want. <a href="url" title="new text">old text</a> |
![]() |
|
| carastir | May 28 2008, 06:38 PM Post #7 |
|
Did you say something?
![]() ![]() ![]() ![]() ![]()
|
![]() I want to hover over a link (left) and change the text (Right) What you gave me did not work, GenerationStudio. ![]() EDIT: Some part of the Javascript that did something like calling an array into the area would be great. But I don't know how to add it on. (It would be even more useful if I could have it in just plain Javascript). Example:
<a href="#" onmouseover="gotext(0)">link name</a> Edited by carastir, May 28 2008, 07:45 PM.
|
![]() |
|
| RyuraGS | May 28 2008, 08:06 PM Post #8 |
![]()
Member
![]() ![]() ![]() ![]() ![]()
|
You need to change it a bit then:
|
![]() |
|
| carastir | May 29 2008, 05:59 PM Post #9 |
|
Did you say something?
![]() ![]() ![]() ![]() ![]()
|
I figured it out ... but I could not get any of your codes to work, GenerationStudio.
Edited by carastir, May 29 2008, 05:59 PM.
|
![]() |
|
| 1 user reading this topic (1 Guest and 0 Anonymous) | |
![]() Our users say it best: "Zetaboards is the best forum service I have ever used." |
|
| « Previous Topic · Coding & Modifications · Next Topic » |




![]](http://z3.ifrm.com/static/1/pip_r.png)






... but I could not get any of your codes to work, GenerationStudio. 
7:26 PM Jul 10