[jQuery] Re: How to enable jquery in a loaded page?

2009-02-09 Thread jQuery Lover

Could you give a link to your test page ?


Read jQuery HowTo Resource  -  http://jquery-howto.blogspot.com



On Sat, Feb 7, 2009 at 6:36 PM, Konstantin Mirin
 wrote:
>
> Well, you have a space in your link. Maybe that's a problem.
> Should be:
>  href="showContent.php?action=addContent&keepThis=true&TB_iframe=true&height=
> 450&width=550" class="thickbox">
>
> But I'm not sure I understanf what are you trying to get in the result. Yout
> thickbox class in link has nothing to do with the ajax query. Or you're
> using some extension that posts class also?
>
> Best regards,
> Konstantin Mirin
>
> mailto:konstantin.mi...@gmail.com
> mailto:i...@konstantin.takeforce.net
>
>
>> -Original Message-
>> From: jquery-en@googlegroups.com
>> [mailto:jquery...@googlegroups.com] On Behalf Of 123gotoandplay
>> Sent: Saturday, February 07, 2009 3:25 PM
>> To: jQuery (English)
>> Subject: [jQuery] Re: How to enable jquery in a loaded page?
>>
>>
>>
>> ok i think i understand the callback.
>>
>> But what about showContent.php in a thickbox iframe ??? i am
>> trying this without any look
>>
>> > class="thickbox">
>>
>> again when i directly browse to showContent.php it works but
>> with the thickbox class it doesn't??
>
>


[jQuery] Re: How to enable jquery in a loaded page?

2009-02-07 Thread Konstantin Mirin

Well, you have a space in your link. Maybe that's a problem.
Should be:


But I'm not sure I understanf what are you trying to get in the result. Yout
thickbox class in link has nothing to do with the ajax query. Or you're
using some extension that posts class also?

Best regards,
Konstantin Mirin
 
mailto:konstantin.mi...@gmail.com
mailto:i...@konstantin.takeforce.net


> -Original Message-
> From: jquery-en@googlegroups.com 
> [mailto:jquery...@googlegroups.com] On Behalf Of 123gotoandplay
> Sent: Saturday, February 07, 2009 3:25 PM
> To: jQuery (English)
> Subject: [jQuery] Re: How to enable jquery in a loaded page?
> 
> 
> 
> ok i think i understand the callback.
> 
> But what about showContent.php in a thickbox iframe ??? i am 
> trying this without any look
> 
>  class="thickbox">
> 
> again when i directly browse to showContent.php it works but 
> with the thickbox class it doesn't??



[jQuery] Re: How to enable jquery in a loaded page?

2009-02-07 Thread Konstantin Mirin

Ide ais to start excecution when ontents in loaded. So you should put only
your ently point call there. Other functions/vars etc may be anywhere.

Best regards,
Konstantin Mirin
 
mailto:konstantin.mi...@gmail.com
mailto:i...@konstantin.takeforce.net


> -Original Message-
> From: jquery-en@googlegroups.com 
> [mailto:jquery...@googlegroups.com] On Behalf Of 123gotoandplay
> Sent: Saturday, February 07, 2009 1:39 PM
> To: jQuery (English)
> Subject: [jQuery] Re: How to enable jquery in a loaded page?
> 
> 
> 
> 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  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 
> >  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?



[jQuery] Re: How to enable jquery in a loaded page?

2009-02-07 Thread 123gotoandplay

ok i think i understand the callback.

But what about showContent.php in a thickbox iframe ??? i am trying
this without any look



again when i directly browse to showContent.php it works but with the
thickbox class it doesn't??


[jQuery] Re: How to enable jquery in a loaded page?

2009-02-07 Thread 123gotoandplay

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  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  
> 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?


[jQuery] Re: How to enable jquery in a loaded page?

2009-02-06 Thread ilovejquery

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  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?


[jQuery] Re: How to enable jquery in a loaded page?

2009-02-06 Thread Grégory Pelletey


Hi 123,

I believe that in showContent.php, your jQuery must relates to the DOM of your 
base.php.
So you should change your jQuery in showContent so that the markups call like 
$("#someDiv") works in the base.php flow.


123gotoandplay a écrit :

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?