views:

50

answers:

2

Hi, I'm trying to use jQuery to change some styling on my page. The page is made dynamically by executing another JavaScript file.

Right now I have

$(window).load(function(){
    $('p').css('font','green');
});

Which does nothing.

$(document).ready(function() will change the static part of the page, but not the generated part.

If I just type $('p').css('font','green'); in the console, the expected results will happen. What is going on?

+3  A: 

I'm guessing you are asking to be able to bind events to objects?

If so, look up the jQuery live() function: http://api.jquery.com/live/

If you are simply trying to apply CSS Styles to the page, you're better off relying on actual CSS style sheets.

Andir
A: 

Instead of listening for the document ready event, can you listen to an event fired by a workcomplete script building the page?

Or can you test for something in the page to indicate it's done every 100ms and then fire such an event yourself?

wombleton