2013-01-19, 01:20 AM
2013-01-19, 01:30 AM
Strange, it worked for me..
2013-01-19, 01:36 AM
Which one did you use?
2013-01-19, 01:37 AM
I just added padding to the unique <a> tag, but I see it doesn't work in Chrome (Firefox and IE are OK though). I'm going to try some other things to see if they'll work in all browsers.
2013-01-19, 01:39 AM
I am using Opera, Good to hear on the IE
2013-01-19, 01:43 AM
Well, it's good that both you and Brad are using the two browsers that it doesn't work with
2013-01-19, 01:52 AM
Solved.
For anyone who is interested....
The solution requires latest jQuery and jQuery scrollTo.
Enjoy !
EDIT: Some old code leftover
For anyone who is interested....
The solution requires latest jQuery and jQuery scrollTo.
<script>
jQuery(document).ready(function() {
var pid = window.location.hash.replace('#pid', '');
var headerHeight = $('#header').height() + $('#header-bottom-cap').height() + 10;
$('a').click(function(){
var hashEle = $(this).attr('href').split('#');
if (hashEle.length > 1) {
if (hashEle[1] == 'top') {
$('body, html').animate({
scrollTop: $("#post" + "pid" + ">tr>td").offset().top
},500);
} else {
jQuery('body, html').animate({
scrollTop: $('#'+ hashEle[1]).offset().top - headerHeight
},500);
}
};
})
hashname = window.location.hash.replace('#', '');
elem = $('#' + hashname);
if(hashname.length > 1) {
if(hashname == 'pid' + *) {
$('body, html').animate({
scrollTop: $("#post" + "pid" + ">tr>td").offset().top
},200);
} else {
$('body, html').animate({
scrollTop: $(elem).offset().top - headerHeight
},500);
}
};
});
</script>
Enjoy !
EDIT: Some old code leftover
2013-01-19, 01:53 AM
Okay, try this:
If your postbit (the entire thing) isn't already wrapped in a div, do so. Create/add to that div's class (it's needed to make position:absolute not go full retard):
Next, add to either a class or inline styling, to the unique <a> tag in the postbit template:
And adjust the top offset accordingly. It seems to work in IE(9?), FF, Chrome and Opera without any negative side effects (that I can see, anyways).
If your postbit (the entire thing) isn't already wrapped in a div, do so. Create/add to that div's class (it's needed to make position:absolute not go full retard):
position: relative;
Next, add to either a class or inline styling, to the unique <a> tag in the postbit template:
display: block; position: absolute; top: -30px; left: -10000px;
And adjust the top offset accordingly. It seems to work in IE(9?), FF, Chrome and Opera without any negative side effects (that I can see, anyways).
2013-01-19, 01:54 AM
There are other solutions though Jason, and not all of us use JQuery.
I will look to see if Scriptaculous can do it if a css solution is not working.
I will look to see if Scriptaculous can do it if a css solution is not working.
2013-01-19, 01:55 AM
Thank you Scoutie, I shall hurry off and test.
IT WORKS!!!
* Leefish goes to test in many browsers.
thank you
IT WORKS!!!
* Leefish goes to test in many browsers.
thank you