[jQuery] Re: Modifying href attribute values

2009-03-15 Thread Jonny Stephens
This seems to work: $('a').each(function() { $(this).attr('href','path/to/' + RegExp("[^#]+$").exec($(this).attr ('href')) + '.html'); }); On Mar 15, 7:03 pm, Jonny Stephens wrote: > Oops. Wrote too soon. > > Works fine f

[jQuery] Re: Modifying href attribute values

2009-03-15 Thread Jonny Stephens
Oops. Wrote too soon. Works fine for a single anchor. With multiples, all receive the same href value as the first. Needs an .each() somewhere? On Mar 15, 5:44 pm, Jonny Stephens wrote: > Thanks Brad, that's perfect! > > Jonny > > On Mar 15, 5:29 pm, Brad wrote: >

[jQuery] Re: Modifying href attribute values

2009-03-15 Thread Jonny Stephens
ashval = patt.exec(href); > > // Again, you'll probably need a more specific jQuery selector > // overwrite the existing href of the selected "a" > $('a').attr('href','path/to/' + hashval + '.html'); > > On Mar 15, 10:22 am, Jonny

[jQuery] Modifying href attribute values

2009-03-15 Thread Jonny Stephens
Can anyone provide guidance on how to modify href attributes in this way: Markup: Modify to: i.e. removing everything up to and including the #, prepending a fixed path value and appending ".html" Thanks Jonny

[jQuery] Re: How to use anchor text as title attribute?

2009-03-05 Thread Jonny Stephens
Thanks for pointing out the omission. I'll use this solution as it's more compact. Jonny On Mar 5, 6:49 am, Klaus Hartl wrote: > > $('a').attr('title' , function() { $(this).text() } ); > > > I must be missing something simple here. > > Yes, a return statement. > > $('a').attr('title' , functio

[jQuery] Re: How to use anchor text as title attribute?

2009-03-04 Thread Jonny Stephens
$(this).text()); > > }); > > Keep in mind, though, that an anchor might have an image inside, > rather than text. I doubt it'd be an issue. I guess jquery would > simply set it to the empty string. > > On Wed, Mar 4, 2009 at 6:11 PM, Jonny Stephens wrote: > >

[jQuery] How to use anchor text as title attribute?

2009-03-04 Thread Jonny Stephens
I want to generate title attributes from existing anchor text, e.g. Foo Foo becomes Foo Foo The code below works in FF3 with Firebug reporting no errors, but Safari reports a parsing error. IE is no go. $('a').attr('title' , function() $(this).text()); adding curly brackets clears the parsin

[jQuery] [Cluetip] Anchor text as title

2009-03-04 Thread Jonny Stephens
At present I'm triggering Cluetip thus, with Cluetip using the anchor title attributes for tip titles: Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore Is there a way to skip the title attribute and instead use the anchor text for the Cluetip title? i.e. Duis aute ir

[jQuery] Re: How to reverse direction of scrollVert fx?

2009-02-22 Thread Jonny Stephens
ts.animOut = { left: 0 }; }; > On Feb 22, 3:57 pm, Jonny Stephens wrote: > > > Cycle's scrollHorz and scrollVert fx options allow "back and forth" > > functionality for the Prev/Next and Pager functions. > > > The scrollVert transition scrolls Next con

[jQuery] Re: How to reverse direction of scrollVert fx?

2009-02-22 Thread Jonny Stephens
On Feb 22, 3:57 pm, Jonny Stephens wrote: > Cycle's scrollHorz and scrollVert fx options allow "back and forth" > functionality for the Prev/Next and Pager functions. > > The scrollVert transition scrolls Next content downwards and Prev > upwards. > > I&#x

[jQuery] [Cycle] How to reverse direction of scrollVert fx?

2009-02-22 Thread Jonny Stephens
Cycle's scrollHorz and scrollVert fx options allow "back and forth" functionality for the Prev/Next and Pager functions. The scrollVert transition scrolls Next content downwards and Prev upwards. I'd prefer these to be reversed: Next = scrolls up, Prev = scrolls down. Thought I'd found an answ

[jQuery] Re: Seeking div hide/show plugin with access by URL

2009-01-27 Thread Jonny Stephens
My oversight. Looking at the comments more closely shows Tabs 2 provides options for separation of navigation and content markup (assigning navClass and containerClass classes respectively). Thanks again. Jonny On Jan 27, 4:58 pm, Jonny Stephens wrote: > Thanks for your suggestions Rica

[jQuery] Re: Seeking div hide/show plugin with access by URL

2009-01-27 Thread Jonny Stephens
Thanks for your suggestions Ricardo. Tabs 2 fails in requiring the trigger links to be located within the same div as the content. Otherwise it fits well. UI Tabs lacks the back button capability of Tabs 2 and doesn't play with Safari 2, which (for better or worse) I'm required to support at pre

[jQuery] Seeking div hide/show plugin with access by URL

2009-01-26 Thread Jonny Stephens
I'm looking for a jQuery 1.2.6 compatible plugin providing the following: In a page with a number of sections in divs, on page load a specified div is visible but all others are hidden. Clicking a link in the sidebar navigation hides the current div and reveals in that position the div which the