1

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>
3
  • Please provide the HTML surrounding txtData as well as the contents of aerialProductListing. Commented Sep 14, 2009 at 18:28
  • 1
    What exactly do you mean by "the CSS is lost"? Style may easily be lost, but a CSS defined style should apply always. Commented Sep 14, 2009 at 18:41
  • @annakata - the CSS simply doesn't work, but If I move the link I want to click to outside the javascript call it works. So something happens when I put the link inside the .inc I mention and call it from javascript as I posted Commented Sep 14, 2009 at 18:57

1 Answer 1

1

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

Sign up to request clarification or add additional context in comments.

1 Comment

@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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.