Loading QuickTime Content in Thickbox on Safari

Posted on December 10, 2006

So I've been working on melodysphotography.com and have it pretty far along. In the portfolio section, I load QuickTime movies into a thickbox. It's a great effect, very nice and clean but Safari doesn't display the movie when the content loads. After some experimentation, I realized that the hover background color change on the close link is enough to trigger a redraw and the movie appears and starts playing. So I put together the following script to force the issue.

<script type="text/javascript">
$(document).ready(function() {
  closeButton = document.getElementById("TB_closeWindowButton");
  color = closeButton.style.color;
  closeButton.style.color = "white";
  closeButton.style.color = color;
})
</script>

It works great, problem solved. By the way, when thickbox loads content, the load event doesn't seem to fire so I included the script just before the close body tag.