[Pro] Anchors

hey all
I have a long page with anchors set up. and a list of links on top of page set up set to go to anchors…
What I’d like to do is have the anchor title change color when visitor hits the hyperlink. Is this possible?

thx


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Do you want it to stay changed, like a “visited” state on a link?

Walter

On Oct 15, 2012, at 8:24 PM, Carla wrote:

hey all
I have a long page with anchors set up. and a list of links on top of page set up set to go to anchors…
What I’d like to do is have the anchor title change color when visitor hits the hyperlink. Is this possible?

thx


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Hi there Walter.
No Id like the anchor to change from grey (original color) to a red color when main link is highlighted then return to its grey color when visitor leaves goes back to list on top of page…
Is this a possibility?

thanks Walter.


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

I just looked through the pseudo-class selectors, and found a new one I didn’t know: :target. I’m not sure if this is what you want, but look at this:

http://scripty.walterdavisstudio.com/anchors

There’s no JavaScript in this – it’s pure HTML and CSS.

Walter

On Oct 15, 2012, at 9:05 PM, Carla wrote:

Hi there Walter.
No Id like the anchor to change from grey (original color) to a red color when main link is highlighted then return to its grey color when visitor leaves goes back to list on top of page…
Is this a possibility?

thanks Walter.


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

EXACTLY!!! what I want Walter.
how do I achiee this

you are a star


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

View the source. The magic sauce is here:

h2:target {
	color: red;
}

So I made this page in a text editor, which meant that I have an inside track to making an ID for each of the h2 tags, and linking to that h2 by its ID. Freeway makes this really difficult to duplicate. I have an Action called AddSelector that might make it possible. There’s some kinks to it, of course, but what you have to do is think like a hand-coder most of the way.

First, download and install AddSelector: Add Selector - ActionsForge

Second, download this document: http://scripty.walterdavisstudio.com/anchors.freeway.zip

Now things to watch in this:

  1. I had to take a lot of care to keep Freeway from adding inline style to the h2. So you might want something besides the default style, and I’m sure you do, so you would need to edit the look of the h2 itself in the Edit Styles dialog.

  2. The anchor links are all hand-coded using the External tab of the Hyperlink dialog. So I made an ID for the H2 with the AddSelector Inline Action (for example ‘one’, and then I made the anchor to that one, I typed ‘#one’ in the External tab of the Hyperlink dialog.

So it’s definitely not click and drag.

Walter

On Oct 15, 2012, at 9:20 PM, Carla wrote:

EXACTLY!!! what I want Walter.
how do I achiee this

you are a star


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

I just felt the two suck punch… I do not think like a hand coder… ha But I will do my best to follow your instructions
and do my best…
thanks Walter…
I will check back if thats is ok

May I use your freeway file to use as a guide and edit that


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

I hope it works for you.

Walter

On Oct 15, 2012, at 9:52 PM, Carla wrote:

I just felt the two suck punch… I do not think like a hand coder… ha But I will do my best to follow your instructions
and do my best…
thanks Walter…
I will check back if thats is ok

May I use your freeway file to use as a guide and edit that


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Me too

Thx!


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Walt
I see that on your main numbers which are anchors in hyperlink external dialog. there is a document call Anchors

how do I achieve this…
I am unclear


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

You have to ignore the Anchors picker in the Hyperlink Dialog. The only thing that will populate that picker are Anchors that Freeway generates using its Edit / Anchor command. The problem with this is that these anchor targets are invisible – you’re never going to get them to change color, because they aren’t ever visible in the first place. In an XHTML page, if you link to an ID of an element on the same page, you’ve just made an anchor link. (In an HTML page, you link to the NAME attribute instead, but the same structure applies.)

But when Freeway makes an anchor, it inserts an empty A tag before whatever text you may have selected. Try this and see:

  1. Select a word or two of text.

  2. From the main menu, choose Edit / Anchor…

  3. Type some name in for your anchor, like foo.

  4. Preview into a text editor, and you’ll see something like this:

    Afghanistan banana stand

An empty a tag doesn’t appear on screen, so when you set up your :target style, you’ll be turning something invisible red. If it would do something like this instead:

<p class="f-lp"><span id="foo">Afghanistan</span> banana stand</p>

You could turn the word Afghanistan red whenever you changed the URL of your browser to whatever.html#foo.

Walter

On Oct 15, 2012, at 10:06 PM, Carla wrote:

Walt
I see that on your main numbers which are anchors in hyperlink external dialog. there is a document call Anchors

how do I achieve this…
I am unclear


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

this will be fun
I get to it
thx


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Walter
unfortunately I am completely inept to accomplish this taskbut I will keep trying


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options