[resolved] jQuery Collapse-O-Matic Gravity Forms conflict? (11 posts)

  1. Olly - OWMC
    Posted 4 years ago #

    i have 1 page which uses Jquery Collapse-O-Matic. with c-o-m activated i get a white strip at the top of the page with this in it:


    and when i click on a title that is supposed to expand. it expands, then collapses, then expands again.

    when i "inspect element" i see this error:

    Uncaught ReferenceError: jQuery is not defined /wp-content/plugins/scripts-gzip/gzip.php?js=wp-content%2Fplugins%2Fjquery-collapse-o-matic%2Fcollapse.js%3Fver%3D1.3.4%2Cwp-content%2Fplugins%2Fgravityforms%2Fjs%2Fgravityforms.js%3Fver%3D1.6.4.4%2Cwp-content%2Fplugins%2Fgravityforms%2Fjs%2Fconditional_logic.js%3Fver%3D1.6.4.4%2Cwp-content%2Fplugins%2Fjquery-collapse-o-matic%2Fcollapse.js%3Fver%3D1.3.4:29

    strange thing is, if i deactivate C-O-M, when i click a title that is supposed to expand... it expands! with c-o-m switched off!??

    this all happened after i put this code into my functions.php

    as advised here: http://wp.tutsplus.com/articles/how-to-include-javascript-and-css-in-your-wordpress-themes-and-plugins/

    this resolved an issue i had with Gravity Forms conditional logic.

    i could leave C-O-M deactivated... as it seems to work anyway... but when i hover over the expandable element the cursor looks like a text tool (and not the pointy hand you would expect). but i want to clean this mess up. i am a total retard when it comes to javascripts and wordpress. any advice would be uber appreciated.


  2. Baden
    Plugin Author

    Posted 4 years ago #

    Olly: There is a lot going on here. Please include a link to your page, as there are a lot of questions that can be answered by actually seeing what is going on.

  3. Olly - OWMC
    Posted 4 years ago #

    my bad... here are the links:

    my C-O-M page:

    my functions.php

    my header.php (if useful):

    my theme is a child of whiteboard framework

    let me know if you would like to see it with C-O-M switched off. i'm guessing that it's gravity forms that allows the collapse/expand still to work.

  4. Baden
    Plugin Author

    Posted 4 years ago #

    change wptuts_scripts_load_cdn function in your functions.php to:

    function wptuts_scripts_load_cdn()  {
        // Deregister the included library
        wp_deregister_script( 'jquery' );  
        // Register the library again from Google's CDN
        wp_register_script( 'jquery', 'http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js', array(), null, false );
  5. Olly - OWMC
    Posted 4 years ago #

    just did.

    now at the top it says

    "ripe="application/wlwmanifest+xml" href="http://gad-center.com/wp-includes/wlwmanifest.xml" />"

    and when i click on the expandable content it still does the expand-collapse-expandagain routine.

  6. Baden
    Plugin Author

    Posted 4 years ago #

    Olly: please set up a temp admin account and send the login details to info (here goes that at symbol) twinpictuers (then a dot) de

    We will get this figured out for you.

  7. Olly - OWMC
    Posted 4 years ago #

    will do straight away.

  8. Olly - OWMC
    Posted 4 years ago #


    hope you don't mind the admin is in french... i will switch it to english if you need.

  9. Olly - OWMC
    Posted 4 years ago #

    wow it looks like you've fixed it! but all my images are gone, looks like it's just the image url is different now. i should be good to fix that myself though. let me know when you're done anyway, don't want to interfere if you're still on it. ta.

  10. Baden
    Plugin Author

    Posted 4 years ago #

    Wow... that was quite something.

    1. if you are going write some jQuery scripts in your WordPress template... always use jQuery() never $()... (header and footer have been fixed)
    2. you where manually loading the collapse.js script in your 4b temnplate... this forced the javascript to load and fire twice. This has been removed.
    3. we de-activated the Scripts Gzip plugin, as it was loading up ALL the scripts on your page twice.

    Your page is now functioning without script errors. However, your theme.css file is using background images that are not properly linked. for example:

    #gad-image-esthetique-laboratoire {
    		background:url('/3-images/03b6-gad-esthetique-laboratoire.jpg')	;

    There is not file located at /3-images/03b6-gad-esthetique-laboratoire.jpg. If you are going to do it this way, it's best to give a full url.


  11. Olly - OWMC
    Posted 4 years ago #

    wow! awesome awesome stuff baden.

    i will sort the css no probs. thanks for the pointers on what i was doing wrong with javascript. i am less of a retard for it. i feel very much in your debt. outstanding customer service... for a free plugin too.

    thanks again.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Collapse-O-Matic
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic