Thanks for all you help
I found the problem is use $.get Instead of  .load and call the function on
call back will wrok
but base on we include  .js on the top level html

for example

we have two html(1.html,2.html) and two .js(1.js,2.js)
if we do thing on 1.html like following

1.html
<html>
<head>
<script src=1.js></script>
<script src=2.js></script></head>
<body>
<div id=somediv></div>
</body>

if we use jquery to get 2.html to show on #somediv and call some function
from 2.js use callback it work great
but if we do thing as
.html
<html>
<head>
<script src=1.js></script>
</head>
<body>
<div id=somediv></div>
</body>
</html>

2.html
 <html>
<head>
<script src=2.js></script>
</head>
<body>
<div id=somediv></div>
</body>
</html>

then try to get 2.html to show on #somediv and call some function from
2.jsuse callback it won't work !!

this mean another problem ,we need to load a lot of .js on 1.html (like
jquery.js plugin1.js plugin2.js plugin3.js my1.js, my2.js,.....)
and wait for using ,but user may be just need one or two , it cause
1.htmldifficult download ,any solution to solve this ?

Thanks for your help

Michael









On 8/20/07, Wizzud <[EMAIL PROTECTED]> wrote:
>
>
>
> What does "some.html" look like?
> You imply that it can be run in its own right, ie that it is a full
> document. IF you are trying to inject a full document into the DOM under
> the
> 'somediv' DIV then it would not be surprising if some functionality
> failed.
>
>
> Michael Lo wrote:
> >
> > Dear all:
> >
> > can some one help
> > why sometime i load some html like
> > $("somediv").show("slow").load("some.html");
> > some javascript function on "some.html" won't work
> > but it will work when call it alone?
> >
> > Thanks!!
> >
> > Michael
> >
> >
>
> --
> View this message in context:
> http://www.nabble.com/some-javascript-function-on-%22some.html%22-won%27t-work-tf4295619s15494.html#a12228822
> Sent from the JQuery mailing list archive at Nabble.com.
>
>

Reply via email to