PDA

View Full Version : bookmarkscroll stopped working in Chrome 12



Burgin
06-12-2011, 11:54 AM
I'm using bookmarkscroll on a page on my grandaughters website and it was working fine until recently. I'm using Chrome 12 and it's now stopped working. It works fine in IE 8 and Firefox 3.

I thought it may be my PC so I cracked up an old laptop and it works fine in IE 7 and it worked OK in Chrome 9 but when I opened the About Chrome window to ascertain the version it updated itself to Chrome 12 and then the scroll effect stopped working.

The strange thing is that the DD demo page works fine in Chrome 12 so I re-installed the script but it still doesn't work in Chrome on my 2 PCs. Am I having a blonde moment or something?

Here's the page...
http://13eth.com/creatures/collective-terms-for-animals.htm

I know I'm missing something obvious but any ideas on what I'm missing will be greatly appreciated.

jscheuer1
06-12-2011, 02:39 PM
In the future, please post about Dynamic Drive Scripts in the Dynamic Drive Scripts Help section here where I've moved this thread, and:

Please include a link to the DD script(s) in question in your post. See this post (http://www.dynamicdrive.com/forums/showpost.php?p=7) for more information.

OK, the problem is that (I assume for formatting reasons) you elected to make the goto element separate from the heading, ex:


. . . allard<br>
Flush of ostriches<br>
Fold of sheep </p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p><a id="g"></a></p>

<h4 class="green">G<a href="#top"><img src="../assets/images/top2.png" alt="Top of Page" width="510" height="18"></a></h4>
<p>Gaggle of geese<br>
Gallop of greyhounds<br>
Gam of whale . . .

However, that element has no layout. Chrome is just being picky, but it's within its rights not to scroll to it because in some respects it technically isn't there. Like it has no width or height and (probably to Chrome and this is important) no offset, so the browser doesn't know where it is.

If you want to keep the same layout and have Chrome recognize the element as having offset, you can move the id to the previous p tag and get rid of the one with the a tag like so:


. . . allard<br>
Flush of ostriches<br>
Fold of sheep </p>
<p>&nbsp;</p>
<p id="g">&nbsp;</p>

<h4 class="green">G<a href="#top"><img src="../assets/images/top2.png" alt="Top of Page" width="510" height="18"></a></h4>
<p>Gaggle of geese<br>
Gallop of greyhounds<br>
Gam of whale . . .

Remember to get rid of the <p><a id="g"></a></p>, and do this similarly for all of the letters. It will layout the same because even in browsers where <p><a id="g"></a></p> works, it still has no layout space.

Burgin
06-12-2011, 04:04 PM
You're right, it works now. Thanks

Sorry about wrong forum, I'd been linking into the General Coding so I didn't see this forum.