HELP - Javascript conflict

  • Profile Image
    granulka
    Asked on June 16, 2011 at 10:41 AM

    Lightbox and feedback forms won't work on my site alongside another javascript I use for navigation.

    <script src="http://www.jotform.com/min/g=feedback" type="text/javascript">  - lightbox script

    <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.min.js"></script>  - nav script (gives a nice halftone image in right column when hovering over links but kills the lightbox script attached to 'book lessons' button)

    I understand the two javascripts probably share function or variable names and so one overwrites the other, but how on earth do I go about sorting this issue when both scripts are 900-odd lines long?

     

    Help anyone?

     

    Or workarounds?

     

    I believe you can call the scripts together from the body tag... but what code would I put in the tag and what would I remove from the scripts?

     

    Here's hoping there's some really clever folks reading this right now (with time on their hands) :-)

  • Profile Image
    liyam
    Answered on June 16, 2011 at 03:05 PM

    Hello granulka,

    Please try using your jquery functions in noconflict mode.

    Here's an example:

    var $j = jQuery.noConflict();
    $j(document).ready(function()
      {
        //Enter jQuery code here
        $j('form').submit();
      }
    );

    Please do let us know if this works.  We'll wait for your update.

    Thanks,

    liyam

  • Profile Image
    Shariq
    Answered on June 24, 2011 at 12:14 PM

    My slideshow has stopped working when I loaded my new jotform.  I tried no conflict mode which did not work.  Are there any workarounds I can try?

  • Profile Image
    liyam
    Answered on June 24, 2011 at 12:41 PM

    Hello Shariq,

    Can you tell us the ID of the form you're referring to? also the website to where it's placed.  We'd like to check and find out other solutions.

    You can also try using iframe instead of embedding or placing the source code on your web page.

    We'll wait for your response.

    Thanks,

    liyam

  • Profile Image
    manisha dey
    Answered on November 21, 2012 at 02:50 AM

    I am using two lightbox.one fancy box image gallery and another lightbox form. embedding lightbox form its not working.i have used no-conflict but no result.

    Please help me

  • Profile Image
    liyam
    Answered on November 21, 2012 at 04:07 AM

    Hello Manisha Dey.  Can you please create a new topic with the proper details of the issue?  It would also help if you can provide us a link to the page where you're having this issue.

    Thanks.