Actually I'll let DevGuru describe it. :) http://www.devguru.com/Technologies/ecmascript/quickref/link.html
-- Brandon Aaron On 8/14/07, Alexandre Plennevaux <[EMAIL PROTECTED]> wrote: > > hi Brandon! > > wow! can you fastly elaborate how does this.hash gets to the anchor name > ? > > thanks a lot! > > alexandre > > ------------------------------ > *From:* [email protected] [mailto:[EMAIL PROTECTED] *On > Behalf Of *Brandon Aaron > *Sent:* mardi 14 août 2007 15:01 > *To:* [email protected] > *Subject:* [jQuery] Re: Kelvin Luck's jscrollpane scrollTo anchor > (missing?) feature > > Hey Alexandre, I know you didn't ask for that code to be cleaned up but I > just felt like shortening it a little. > > $('#submenu li a') > .bind('click', function() { > var $panel = $('#rightContent'); > $panel[0].scrollTo( $(this.hash).offset().top - > $panel.offset().top ); > return false; > }); > > -- > Brandon Aaron > > On 8/14/07, Alexandre Plennevaux <[EMAIL PROTECTED]> wrote: > > > > > > By the way, if anyone interested i found my solution like this: > > > > $('#submenu li a').bind('click', function(){ > > var targetPos = $(this).attr('href').substr(1); > > var $panel = $('#rightContent'); > > var paneltop = parseInt($panel.offset().top); > > targetPos = $('#'+targetPos).offset().top; > > $('#rightContent')[0].scrollTo(parseInt(targetPos - > > paneltop)); > > return false; > > }); > > > > With each anchor having its id same as its name value: <a id="downloads" > > name="downloads"></a> > > > > This is using the dimensions.js plugin.... > > > > > > > > > > > > > > -----Original Message----- > > From: [email protected] [mailto:[email protected] ] On > > Behalf Of Kelvin Luck > > Sent: mardi 14 août 2007 9:45 > > To: [email protected] > > Subject: [jQuery] Re: Kelvin Luck's jscrollpane scrollTo anchor > > (missing?) feature > > > > > > Hi, > > > > I think this is a nice idea for an addition to the jScrollPane. I've > > added it as an issue on the plugin's support page: > > > > http://jquery.com/plugins/node/348 > > > > I'll try and implement it ASAP, it's not complex to do, > > > > Cheers, > > > > Kelvin :) > > > > Alexandre Plennevaux wrote: > > > hello! > > > > > > i have 3 anchor links (allowing to jump to a specific chapter in a > > > text) and i was wondering if there is a simple way to make the page > > > slide down instead of jump to the target anchor. > > > i find kelvin's jscrollpane allows to do it. question: can it take an > > > element as parameter or does it need an Int? > > > > > > something like: > > > > > > $('#anchorLink').bind('click', function(){ > > > $('.scroll-pane').scrollTo($('#targetAnchor'); > > > }); > > > > > > > > > i tried that and a few other ways but that i could not make it roll. > > > Maybe a nice add on feature? > > > > > > > > > thanks all, have a great week ! > > > > > > Alexandre > > > > > > Ce message Envoi est certifié sans virus connu. > > > Analyse effectuée par AVG. > > > Version: 7.5.476 / Base de données virus: 269.11.15/949 - Date: > > > 12/08/2007 11:03 > > > > > > > Ce message Envoi est certifié sans virus connu. > > Analyse effectuée par AVG. > > Version: 7.5.483 / Base de données virus: 269.11.17/951 - Date: > > 13/08/2007 10:15 > > > > > > > > Ce message Envoi est certifié sans virus connu. > Analyse effectuée par AVG. > Version: 7.5.483 / Base de données virus: 269.11.17/951 - Date: 13/08/2007 > 10:15 >

