Need help? Check out our Support site, then


"jQuery not defined" issue after WordPress 2.6.3 upgrade

  1. Hey guys,

    I just upgraded to WordPress version 2.6.3 and Firebug, which I'm running as a Firefox add-on, is telling me that I have a jQuery issue. The specific error reads "jQuery is not defined" and appears as what looks like two separate scripts. Here's the first, which references Line 1 in the error...

    1jQuery(document).ready( function() {
    2 // pulse
    3 jQuery('.fade').animate( { backgroundColor: '#ffffe0' }, 300).animate( { backgroundColor: '#fffbcc' }, 300).animate( { backgroundColor: '#ffffe0' }, 300).animate( { backgroundColor: '#fffbcc' }, 300);
    4
    5 // Reveal
    6 jQuery('.wp-no-js-hidden').removeClass( 'wp-no-js-hidden' );
    7
    8 // Basic form validation
    9 if ( ( 'undefined' != typeof wpAjax ) && jQuery.isFunction( wpAjax.validateForm ) ) {
    10 jQuery('form.validate').submit( function() { return wpAjax.validateForm( jQuery(this) ); } );
    11 }
    12});
    13
    14(function(JQ) {
    15 JQ.fn.tTips = function() {
    16
    17 JQ('body').append('<div id="tTips"><p id="tTips_inside"></p></div>');
    18 var TT = JQ('#tTips');
    19
    20 this.each(function() {
    21 var el = JQ(this), txt;
    22
    23 if ( txt = el.attr('title') ) el.attr('tip', txt).removeAttr('title');
    24 else return;
    25 el.find('img').removeAttr('alt');
    26
    27 el.mouseover(function(e) {
    28 txt = el.attr('tip'), o = el.offset();;
    29
    30 clearTimeout(TT.sD);
    31 TT.find('p').html(txt);
    32
    33 TT.css({'top': o.top - 43, 'left': o.left - 5});
    34 TT.sD = setTimeout(function(){TT.fadeIn(150);}, 100);
    35 });
    36
    37 el.mouseout(function() {
    38 clearTimeout(TT.sD);
    39 TT.css({display : 'none'});
    40 })
    41 });
    42 }
    43}(jQuery));
    44
    45jQuery(function(){jQuery('#media-buttons a').tTips();});

    ...and the second, which references Line 2 in the error...

    1var theList; var theExtraList;
    2jQuery(function($) {
    3
    4var dimAfter = function( r, settings ) {
    5 $('li span.comment-count').each( function() {
    6 var a = $(this);
    7 var n = parseInt(a.html(),10);
    8 n = n + ( $('#' + settings.element).is('.' + settings.dimClass) ? 1 : -1 );
    9 if ( n < 0 ) { n = 0; }
    10 a.html( n.toString() );
    11 $('#awaiting-mod')[ 0 == n ? 'addClass' : 'removeClass' ]('count-0');
    12 });
    13 $('.post-com-count span.comment-count').each( function() {
    14 var a = $(this);
    15 var n = parseInt(a.html(),10);
    16 var t = parseInt(a.parent().attr('title'), 10);
    17 if ( $('#' + settings.element).is('.unapproved') ) { // we unapproved a formerly approved comment
    18 n = n - 1;
    19 t = t + 1;
    20 } else { // we approved a formerly unapproved comment
    21 n = n + 1;
    22 t = t - 1;
    23 }
    24 if ( n < 0 ) { n = 0; }
    25 if ( t < 0 ) { t = 0; }
    26 if ( t >= 0 ) { a.parent().attr('title', adminCommentsL10n.pending.replace( /%i%/, t.toString() ) ); }
    27 if ( 0 === t ) { a.parents('strong:first').replaceWith( a.parents('strong:first').html() ); }
    28 a.html( n.toString() );
    29 });
    30}
    31
    32var delAfter = function( r, settings ) {
    33 $('li span.comment-count').each( function() {
    34 var a = $(this);
    35 var n = parseInt(a.html(),10);
    36 if ( $('#' + settings.element).is('.unapproved') ) { // we deleted a formerly unapproved comment
    37 n = n - 1;
    38 } else if ( $(settings.target).parents( 'span.unapprove' ).size() ) { // we "deleted" an approved comment from the approved list by clicking "Unapprove"
    39 n = n + 1;
    40 }
    41 if ( n < 0 ) { n = 0; }
    42 a.html( n.toString() );
    43 $('#awaiting-mod')[ 0 == n ? 'addClass' : 'removeClass' ]('count-0');
    44 });
    45 $('.post-com-count span.comment-count').each( function() {
    46 var a = $(this);
    47 if ( $('#' + settings.element).is('.unapproved') ) { // we deleted a formerly unapproved comment
    48 var t = parseInt(a.parent().attr('title'), 10);
    49 if ( t < 1 ) { return; }
    50 t = t - 1;
    51 a.parent().attr('title', adminCommentsL10n.pending.replace( /%i%/, t.toString() ) );
    52 if ( 0 === t ) { a.parents('strong:first').replaceWith( a.parents('strong:first').html() ); }
    53 return;
    54 }
    55 var n = parseInt(a.html(),10) - 1;
    56 a.html( n.toString() );
    57 });
    58
    59 if ( theExtraList.size() == 0 || theExtraList.children().size() == 0 ) {
    60 return;
    61 }
    62
    63 theList.get(0).wpList.add( theExtraList.children(':eq(0)').remove().clone() );
    64 $('#get-extra-comments').submit();
    65}
    66
    67theExtraList = $('#the-extra-comment-list').wpList( { alt: '', delColor: 'none', addColor: 'none' } );
    68theList = $('#the-comment-list').wpList( { alt: '', dimAfter: dimAfter, delAfter: delAfter, addColor: 'none' } );
    69
    70} );
    71

    Any idea what this will affect? Any thoughts on how to fix these errors? My URL is...

    http://bloobyrd.com

    Thanks!
    Adam

  2. Sorry, I don't think you're in the right place. This is the support forum for WordPress.COM. You need to be over at support for self-hosted WordPress http://wordpress.org/support/

    WordPress.COM or WordPress.ORG? The difference

  3. Gotcha...thanks.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags