Support » Plugin: Welcome Pack » [Plugin: Welcome Pack] Getting js error on the email admin

  • Hi!

    I just downloaded the plugin and tried it out on my site. I get a js error saying that jq is not defined. I rewrote the js to this

    (function($) {
    	$(document).ready( function() {
    		if (-1 ==='tab=emails'))
    		$('div.initially-hidden').each( function() {
    		$('#dpw-admin-metaboxes-general input').click( function() {
    			var button = $(this);
    			var config = $('div.setting-' + button.attr('class'));
    			if ( 1 == button.attr('value') )
    				config.css('background-color', 'rgb(255,255,224)').slideDown('fast').animate( { backgroundColor: 'rgb(255,255,255)' }, 1600);
    		$('#emailpicker').change( function() {
    			var index = this.selectedIndex;
    			if ( 0 == index ) {
    			$.post( ajaxurl, {
    				action: 'dpw_fetch_email',
    				'cookie': encodeURIComponent(document.cookie),
    				'_wpnonce': $("#_ajax_nonce_dpw_emails").val(),
    				'id': index
    				if ( response[0] + response[1] == '-1' )
    				$('#email').html(response.substr(0, response.length-1)).show();

    and that works. Unless jq was intended as something different than a shorthand for jQuery then the self execution wrapper is the recommended way of doing things.

Viewing 1 replies (of 1 total)
  • Plugin Author Paul Gibbs


    BuddyPress Lead Developer

    jq was/is used by the BuddyPress default theme. Obviously it only works as long as you are using the default theme, or a child theme of it, or redeclare it. I have changed this in the current development version which I’ll release in a couple of weeks.
    Thank you for writing and leaving feedback

Viewing 1 replies (of 1 total)
  • The topic ‘[Plugin: Welcome Pack] Getting js error on the email admin’ is closed to new replies.