hmm, so i need to put all the javascript, i have in showContent.php's $ (document).ready(function () {
in a callback function?? Can i leave the other js functions in showContent.php or should i copy those function into my "base" php file?? regards, On 6 feb, 15:33, ilovejquery <ilovejqu...@gmail.com> wrote: > It's probably because your jquery code is in $(document).ready() > function and it is never fired when you load with .load(). > > Put your code in callback function like this: > > $(document).ready(function() { > $("#show").click(function() { > $("#content").css("overflow-y", "scroll"); > $("#content").load("showContent.php", function(){ > > // your code here... > > }); > > }); > > ---- > Read jQuery HowTo Resource - http://jquery-howto.blogspot.com > > On Fri, Feb 6, 2009 at 6:40 PM, 123gotoandplay <wesweatyous...@gmail.com> > wrote: > > > Hi there, > > > I am having a problem to enable jquey in a loaded page. > > > For example: > > > base.php has jquery and i load showContent.php like: > > > $(document).ready(function() { > > $("#show").click(function() { > > $("#content").css("overflow-y", "scroll"); > > $("#content").load("showContent.php"); > > }); > > > but now the jquery in showContent.php doesn't work. > > > if i directly browse to showContent.php the jquery does work > > > Any tips?