The data parameter is optional (note the very faint square brackets around
it on the doc page), so that isn't the problem.
The problem, as it is so often, is 'this':
var soffset = $(this).offset();
In the working code, 'this' is the #myinfo element.
In the broken code, 'this' is the #mycontent
The second argument for the load() function is "data", not "callback":
http://docs.jquery.com/Ajax/load#urldatacallback
Do this instead:
$("span#mycontent").load("mytext.txt", {}, function(){
// callback code here
});
-Dan
On Fri, Sep 18, 2009 at 5:51 AM, geegler wrote:
>
> How come this c
2 matches
Mail list logo