WordPress.org

Ready to get started?Download WordPress

Forums

Football Pool
Problem with jquery? (14 posts)

  1. AndresCZ
    Member
    Posted 1 year ago #

    Hi,
    when I activate the plugin, jquery transitions of my post slider stops working. I use UnPointZero Slider. What can I do about it? Is it the problem of the slider or the pool?

    http://wordpress.org/extend/plugins/football-pool/

  2. AntoineH
    Member
    Plugin Author

    Posted 1 year ago #

    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.

  3. AndresCZ
    Member
    Posted 1 year ago #

    Oh, thank you very much for trying! :)

  4. AntoineH
    Member
    Plugin Author

    Posted 1 year ago #

    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.

  5. AndresCZ
    Member
    Posted 1 year ago #

    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....

  6. AntoineH
    Member
    Plugin Author

    Posted 1 year ago #

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

  7. AntoineH
    Member
    Plugin Author

    Posted 1 year ago #

    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.

  8. AndresCZ
    Member
    Posted 1 year ago #

    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
    	} );
    });
  9. AntoineH
    Member
    Plugin Author

    Posted 1 year ago #

    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"
    			// }
    		});
    	}
  10. AndresCZ
    Member
    Posted 1 year ago #

    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 :)

  11. AndresCZ
    Member
    Posted 1 year ago #

    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?

  12. AntoineH
    Member
    Plugin Author

    Posted 1 year ago #

    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.

  13. AndresCZ
    Member
    Posted 1 year ago #

    Can I just simply use the plugin without Highcharts? :)

  14. AntoineH
    Member
    Plugin Author

    Posted 1 year ago #

    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.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.