tags:

views:

85

answers:

1
+1  Q: 

JavaScript and CSS

I am wanting to implement Thickbox, which I have done a number of times.

My issue is that I am doing some jQuery like:

$('#txtData').load('aerialProductListing.inc');

and when this happens, the CSS is lost.

How can I get the stylesheet recognized again? or can i do something inline to work around?

Edit: txtData is simple:

<div id='txtData'><p></p></div>


aerialproductListing.inc is simple HTML and PHP, nothing fancy and to long to post, but the Thickbox piece isL

<a href="tip.inc?height=400&width=600" class="thickbox small" title="<b>US Tips">US Tip Chart</a>
+1  A: 

If a <style type="text/css"></style> element is declared inside the #txtData element, it will be gone after $('#txtData').load(...).

orip
@orip - but it isn't and I understand it would be wiped out. The style sheet is defined on index.php and on index.php I do an include to a file hat displays a chunk of the site and in the piece I include I do some javascript stuff when the user clicks on the link and the last line is the $('#txtData').load(...). to finish the process. It is when the user clicks the link I mentioned that the style sheet stuff does not work any more