![]() |
Man I am tired of this crap not working? Just freaking scroll!!!
So, I am simply trying to get a div to scroll to a term. When a user clicks a term I have code below that finds the term in the div. This much works, I can find the span with the correct term in it. But I cannot seem to get it to scroll to that point.
Now I am wondering if the problem is the fact that I populated the div dynamically. Would this cause a problem? All of the alerts for offset return 0. Here is how I populated the div from an XML file: Code:
var curLetter = "@";Code:
var thisObj = $('#glossaryContent').find('span:contains("' + evt + '")');Code:
<div id="glossaryContainer" style="left:140px;top:155px;display:none;"> |
It seems that scrollto and a few other things are not supported in v1.8 due to Webkit functionality. Not sure if I am going to revert to 1.7 or try something else.
|
you could try plain ol' javascript :eek:
generally speaking what I have found in scrolling from one element to another using their offsets is that you have to scroll back to the top of the container first so that you then scroll the correct amount I guess in jQuery that would translate to something like this: Code:
$("#scrolling_div").scrollTop(0); |
| All times are GMT +1. The time now is 08:29 AM. |
Powered by vBulletin®
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.