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.

I'm getting this error in FireFox:

Error: jQuery(domChunk).live is not a function Source File: http://www.bradford.nhs.uk/wp-includes/js/thickbox/thickbox.js?ver=3.1-20110528 Line: 26

This is the function:

//add thickbox to href & area elements that have a class of .thickbox
function tb_init(domChunk){
    jQuery(domChunk).live('click', tb_click);
}

Thickbox seems to be a build in WordPress feature but the theme we are using uses prettyPhoto.

share|improve this question
    
I have changed this to .bind but it has caused other errors such as –  JohnnyBizzle Aug 1 '11 at 9:50
    
Error: element.dispatchEvent is not a function Source File: http ... www......uk /wp-admin/load-scripts.php?c=0&load=jquery,prototype,utils,scriptaculous-root,sc‌​riptaculous-builder,scriptaculous-effects,scriptaculous-dragdrop,scriptaculous-sl‌​ider,scriptaculous-controls&ver=496be2cb050e55197c680d4612290054 –  JohnnyBizzle Aug 1 '11 at 9:51
    
Any plugins that re-register jQuery, from the sounds of it, something is registering an older version of jQuery, which does not support have the live function. –  t31os Aug 1 '11 at 10:34
    
Correct - the version showing is 1.2.6 in the thickbox.js but the actual version I am loading is 1.6.1 –  JohnnyBizzle Aug 1 '11 at 10:57
    
Is jQuery only loaded once, ie. if you check the source of the page is there only 1.6.1, or are you seeing any other versions output? Any possibility of seeing a page with the problem? –  t31os Aug 1 '11 at 11:10

1 Answer 1

up vote 1 down vote accepted

I used jQuery(domChunk).bind instead. This seems to work.

share|improve this answer

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.