WordPress.org

Support

Support » Plugins and Hacks » Football Pool » Problem with jquery?

Problem with jquery?

Viewing 13 replies - 1 through 13 (of 13 total)
  • Plugin Author AntoineH

    @antoineh

    I have no experience with the UnPointZero Slider. I’ll have a look at it and try to figure out what is causing your problem.

    Oh, thank you very much for trying! 🙂

    Plugin Author AntoineH

    @antoineh

    Can you send me a link to your website (use wordpressfootballpool@gmail.com if you don’t want to post it on the forum) where I can see the problem?

    I tried the slider plugin on my own install and everything seems to work just fine. Tested it with the latest version of the plugin and WP 3.4.2 and 3.5.

    well no problem, it’s http://www.atleticomadrid.cz/ but I do not have your plugin activated richt now, because of that colision. But you can maybe check jquery in header for potential problems there….

    Plugin Author AntoineH

    @antoineh

    You are using a rather old version of jQuery (1.3.2). Have you tried updating to a newer version?

    Plugin Author AntoineH

    @antoineh

    Or try replacing the colorbox version (pluginfolder/assets/colorbox) with an older one. The version I’m using requires jQuery 1.4.3+.

    See http://www.jacklmoore.com/colorbox for details and download.

    Ok, I implemented jQuery 1.8.3, but I still have the same problem with the slider.

    However I kinda detected, where the problem could be. When I delete the first part in your file “football-pool/assets/pool.js”, the slider works fine, although I didn’t test what it does to your plugin.

    The exact part I deleted is:

    jQuery( document ).ready( function() {
    
    	// set some default Highchart options
    	Highcharts.setOptions( {
    		// no link to highcharts.com
    		credits: {
    			enabled: false
    		},
    		// Google Chart colors
    		colors: [ '#3366CC', '#DC3912', '#FF9900', '#109618', '#990099', '#0099C6', '#DD4477',
    				'#66AA00', '#B82E2E', '#316395', '#994499', '#22AA99', '#AAAA11', '#6633CC',
    				'#E67300', '#8B0707', '#651067', '#329262', '#5574A6', '#3B3EAC', '#B77322',
    				'#16D620', '#B91383', '#F4359E', '#9C5935', '#A9C413', '#2A778D', '#668D1C',
    				'#BEA413', '#0C5922', '#743411' ],
    		// // NL
    		// lang: {
    			// resetZoom: "weer uitzoomen",
    			// resetZoomTitle: "uitzoomen naar 1:1"
    		// }
    	});
    
    	// user selection on the statistics page
    	footballpool_line_chart_control();
    
    	// colorbox
    	jQuery( ".fp-lightbox" ).colorbox( {
    		transition		: 'elastic',
    		speed			: 400
    	} );
    });

    Plugin Author AntoineH

    @antoineh

    I guess the Highcharts call is causing the problem. You may try enclosing it in a check if the object exists.

    // set some default Highcharts options
    	if ( typeof Highcharts != 'undefined' ) {
    		Highcharts.setOptions( {
    			// no link to highcharts.com
    			credits: {
    				enabled: false
    			},
    			// Google Chart colors
    			colors: [ '#3366CC', '#DC3912', '#FF9900', '#109618', '#990099', '#0099C6', '#DD4477',
    					'#66AA00', '#B82E2E', '#316395', '#994499', '#22AA99', '#AAAA11', '#6633CC',
    					'#E67300', '#8B0707', '#651067', '#329262', '#5574A6', '#3B3EAC', '#B77322',
    					'#16D620', '#B91383', '#F4359E', '#9C5935', '#A9C413', '#2A778D', '#668D1C',
    					'#BEA413', '#0C5922', '#743411' ],
    			// // NL
    			// lang: {
    				// resetZoom: "weer uitzoomen",
    				// resetZoomTitle: "uitzoomen naar 1:1"
    			// }
    		});
    	}

    Thank you very much, it seems to be working just fine now! I sent at least a tiny donation as an expression of graditude. Dank je wel 🙂

    This is weird. The problem is back on.

    But when I rename jQuery( document ).ready( function() to jQuery( document1 ).ready( function() it works. Is that possible to work that way?

    Plugin Author AntoineH

    @antoineh

    Very weird that the problem came back. The problem is a piece of javascript that has a conflict with one of your (many) other javascripts, but it’s hard to tell which part is causing the problem.

    Renaming the part to document1 is the same as deleting what you did in the first place. You’re disabling that whole part.

    A way of pinpointing the problem is to disable small pieces of the javascript one by one and see when the problem is gone.

    Can I just simply use the plugin without Highcharts? 🙂

    Plugin Author AntoineH

    @antoineh

    Yes, if Highcharts is conflicting with your other plugins, then you can disable this functionality. For this take these 2 steps:

    1. Go to the football pool plugin options and disable the charts option.
    2. Open the pool.js file and change everything before the line ‘function footballpool_change_joker( id ) {‘ to:
    jQuery( document ).ready( function() {
    	// colorbox
    	jQuery( ".fp-lightbox" ).colorbox( {
    		transition		: 'elastic',
    		speed			: 400
    	} );
    });

    My next version (v2.2) will cover the second point automatically.

Viewing 13 replies - 1 through 13 (of 13 total)
  • The topic ‘Problem with jquery?’ is closed to new replies.
Skip to toolbar