[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: a href=22_foo.html#foo22-name Modify to: a href=path/to/foo22-name.html i.e. removing everything up to and including the #, prepending a fixed path value and appending .html Thanks Jonny

[jQuery] Re: Modifying href attribute values

2009-03-15 Thread Jonny Stephens
// overwrite the existing href of the selected a $('a').attr('href','path/to/' + hashval + '.html'); On Mar 15, 10:22 am, Jonny Stephens goo...@bloog.co.uk wrote: Can anyone provide guidance on how to modify href attributes in this way: Markup: a href=22_foo.html#foo22-name Modify

[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 goo...@bloog.co.uk wrote: Thanks Brad, that's perfect! Jonny On Mar 15, 5:29 pm, Brad nrmlcrpt...@gmail.com

[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 goo...@bloog.co.uk wrote: Oops. Wrote too soon. Works fine for a single anchor. With multiples, all receive the same

[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: a id=content-1 href=#content-1 rel=#content-1 title=Duis aute irure dolor in reprehenderit in voluptate velit esse cillum doloreDuis aute irure dolor in reprehenderit in voluptate velit esse

[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. a href=foo.htmlFoo Foo/a becomes a href=foo.html title=Foo FooFoo Foo/a 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()

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

2009-03-04 Thread Jonny Stephens
()); }); 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 goo...@bloog.co.uk wrote: I want to generate title attributes from

[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

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

2009-02-22 Thread Jonny Stephens
, Jonny Stephens goo...@bloog.co.uk 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'd prefer these to be reversed: Next = scrolls up

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

2009-02-22 Thread Jonny Stephens
: 0 }; }; On Feb 22, 3:57 pm, Jonny Stephens goo...@bloog.co.uk 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'd prefer

[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

[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 goo...@bloog.co.uk wrote: Thanks for your

[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