Hi all,

Came up against this problem earlier today, I searched around and found 
that similar people had the same problem, e.g.
http://codylindley.com/thickboxforum/comments.php?DiscussionID=302&page=1#Item_0

I'm trying to jump to an anchor in the content that is loaded within a 
thickbox popup.

I tried modifying the source of thickbox (v 2.1) to capture the hash:

var hash = url.replace(/^.*(\#.[^\?]*)\??.+/gi,'$1');

I then took the scroll functionality from the thickbox site and tried 
referencing the anchor by adjusting the thickbox code as follows:

else{
    $("#TB_ajaxContent").load(url, function(){
        TB_position();
        $("#TB_load").remove();
        $("#TB_window").css({display:"block"});

        $(hash).ScrollTo(500); // this line here
    });
}

But it won't scroll the content, I think this is because ScrollTo is 
referencing the parent window rather than the div's current scrolled 
position.

Can anyone help please?
Cheers.


_______________________________________________
jQuery mailing list
[email protected]
http://jquery.com/discuss/

Reply via email to