Feedback code conflciting with Lightbox code

  • Profile Image
    jtech
    Asked on November 28, 2011 at 09:36 PM

    Added a feedback button to my client's website. After adding the code to the home page, the lightbox slider stopped working. The JotForm code is commented out at this time. Looking for a simple workaround as my Javascript expereince is on the weak side.

  • Profile Image
    fxr
    Answered on November 29, 2011 at 06:26 AM

    Try moving the JotForm feedback button script to near the end of your HTML, just before the closing </body> tag.

    Then try changing the lines at 47 to 52 from:

    $(document).ready(function() {

     

    //Execute the slideShow

    slideShow();

     

    });

     

    to

     

    $.noConflict();

      jQuery(document).ready(function($) {

        slideShow();

      });

     

    That may or may not work, if it doesnt; try also changing the lines in your two functions Slideshow & Gallery  that use $ : and change it to jQuery .

    e.g first line of slideShow would be :

    jQuery('#gallery a').css({opacity: 0.0});

     

     

    If that still doesnt work, please provide a link to a clone/copy of your webpage with the Feedback script enabled so that we can look a little deeper into any potential bugs. (you should probably do all your testing on a copied/cloned page (e.g index2.html) if your site is currently live )

  • Profile Image
    Jim Jacobus
    Answered on November 29, 2011 at 10:53 AM

    I will follow up this evening on your suggestions and will post an update.

  • Profile Image
    fxr
    Answered on November 29, 2011 at 11:04 AM

    OK, your jquery code doesnt look overly complicated, so we should be able to find a solution between us.

  • Profile Image
    jtech
    Answered on November 29, 2011 at 11:21 PM

    I tried all three suggestions, but the slideshow is still hung up. You can test on the live site: http://www.scottsautocenter.net/

  • Profile Image
    allanftd
    Answered on November 30, 2011 at 01:14 AM

    Please refer to the following threads related to this issue for more information on how to resolve this conflict:

    http://www.jotform.com/answers/26824-JQuery-conflict-with-Feedback-Button

    http://www.jotform.com/answers/39649-The-form-is-blocking-my-script-to-work-properly-how-can-I-fix-this

    http://www.jotform.com/answers/45519-Form-feedback-button-breaks-the-jquery-plugin-in-my-website

    We hope you find these useful. Please let us know if you need further assistance.

  • Profile Image
    liyam
    Answered on November 30, 2011 at 04:10 AM

    Hello,

    Can you share with us the original code where it runs properly without the JotForm feedback form?  I tried running your page without the jotform script and I can't seem to make it work.

    Also, if what you're planning is a some sort of moving gallery for your banner image, I would recommend for you to use jquery's jcarousel.  We also have quick solution for this that you can read on on this user guide.

    Thanks.

  • Profile Image
    fxr
    Answered on November 30, 2011 at 04:43 AM

    There was just a few switches of the $ alias for jQuery missing in Jtechs updated code.

    Here is the required code -> http://pastie.org/2943178

    That needs to replace that <script> tag and its contents thats sandwiched between the Jquery framework load & JotForms feedback button script.

     

    I have tested updated code and it does work. 

  • Profile Image
    jtech
    Answered on November 30, 2011 at 06:08 PM

    Gentlemen - Thanks for your help with this issue. The code adding the last few switches by fxr did the trick. Both scripts are working as advertised.

  • Profile Image
    fxr
    Answered on November 30, 2011 at 06:15 PM

    Good to hear.  :)