My best guess, assuming you've done everything else right (a reasonable assumption if the script is working for you), is that you have something like white text on a white background or black text on a black background as far as the caption goes. This is governed by the overall styles (how they all work together as far as the caption text goes) of your page.
If this is the issue, you should be able to drag the the mouse (with its left button depressed) over the otherwise invisible caption - the universal 'mouse highlight text move' - and the text will appear.
But, it could be many things. If the ideas I presented here don't resolve this issue for you:
Please post a link to the page on your site that contains the problematic code so we can check it out.
Bookmarks