Example here: http://scripty.walterdavisstudio.com/auto-link-highlight
Download here: http://scripty.walterdavisstudio.com/auto-link-highlight/auto-link-highlight.freeway.zip
Walter
On Sep 2, 2012, at 3:47 PM, Walter Lee Davis wrote:
Small typo. This should read as follows:
var me = window.location.href.sub(‘index.html’,‘’);
$$(‘a’).select(function(elm){
return me.include(elm.href.sub(‘index.html’,‘’));
}).invoke(‘addClassName’,‘current’);The mistake was applying addClassName to an array of results, rather than a single element. The invoke() method applies the same method to each member of an array.
Walter
On Sep 2, 2012, at 3:34 PM, Walter Lee Davis wrote:
var me = window.location.href.sub(‘index.html’,‘’);
$$(‘a’).select(function(elm){
return me.include(elm.href.sub(‘index.html’,‘’));
}).addClassName(‘current’);
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