WordPress.org

Ready to get started?Download WordPress

Forums

WordPress phpinfo()
Javascript error (5 posts)

  1. Prause
    Member
    Posted 3 years ago #

    Hi Christopher,
    the plugin displays an javascript error:

    Error: $ is not a function
    Source File: http://theta.csga.cz/core-wp-csga/wp-content/plugins/wordpress-php-info/common/wp-admin.js
    Line: 4

    This causes malfunction of some other plugins.

  2. christopherross
    Member
    Plugin Author

    Posted 3 years ago #

    Thanks Prause, could you give me an example of a plugin it doesn't work with so I can work on it? Chris

  3. Prause
    Member
    Posted 3 years ago #

    It is WP Admin Menu, see

  4. Prause
    Member
    Posted 3 years ago #

    Sorry, once more:
    WP Admin Menu

  5. jeremyHixon
    Member
    Posted 3 years ago #

    It's because the jQuery in the wordpress-php-info plugin isn't in noConflict mode. Replacing the code in wordpress-php-info\common\wp-admin.js with the following should fix it. It fixed it on my dev box.

    // Set up jQuery in noConflict() mode
    var $wphp = jQuery.noConflict();
    
    $wphp(document).ready(function() {
    
    	//ACCORDION BUTTON ACTION
    	$wphp('div.accordionButton').click(function() {
    		$wphp('div.accordionContent').slideUp('normal');
    		$wphp(this).next().slideDown('normal');
    	});
    
    	//HIDE THE DIVS ON PAGE LOAD
    	$wphp('div.accordionContent').hide();
    
    });

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic