Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

Prior to the 3.3 beta 3 I used thickbox on the front end with the below script. Since beta 3 the lightbox has stopped working. Is there an error in my code or did the function change?

function add_themescript(){
    if(!is_admin()){
    wp_enqueue_script('thickbox',null,array('jquery'));
    wp_enqueue_style('thickbox.css', '/'.WPINC.'/js/thickbox/thickbox.css', null, '1.0');
    }

}
add_action('init','add_themescript');
share|improve this question
    
Is the thickbox script being included in the markup on the frontend? –  Tom J Nowell Nov 16 '11 at 17:19
    
Does it throw an error? –  Pippin Nov 17 '11 at 4:33
    
Yes, the css and the js are included. No errors are evident. It just does not work. –  mattrepublic Nov 17 '11 at 18:46
    
Here is code that works in 3.3. –  toscho Feb 17 '12 at 10:55

2 Answers 2

This is possibly related to an issue in Wordpress regarding cache that has just been fixed within the last hour:

http://core.trac.wordpress.org/changeset/19318

Here's the Trac ticket:

http://core.trac.wordpress.org/ticket/19240

Clearing your cache may help in the meantime before beta 4/RC1

share|improve this answer
    
Thanks Tom. Clearing the cache didn't help but hopefully the patch will fix it. –  mattrepublic Nov 17 '11 at 18:47

WP 3.3 uses jQuery 1.7. It's possible that the thickbox script doesn't work with 1.7. I know some other scripts, such as the popular Nivo Slider, have had problems with it already.

share|improve this answer
    
but the built in media uploader works with that version of jQuery and ThickBox –  Bainternet Nov 16 '11 at 23:15
    
Good call there. –  Pippin Nov 17 '11 at 4:32

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.