Lightbox embed not working on webpage with custom script code.

  • SegPayJeff
    Asked on July 7, 2015 at 12:52 PM

    My homepage has a small script for a slider I am using.  For some reason the embed doesn't work on this page.

     

    Any ideas on why it isn't working?

     

    This is the script tag

    <script>

            $(function() {

                $('.hero-copy').unslider({

                dots: true,

                delay: 7000

                })

            });

        </script>

     

    When I remove that from the HTML the ligtbox pops up, when it is in the HTML the lightbox will not pop.

     

    Thanks,

    Jeff

  • Ashwin JotForm Support
    Replied on July 7, 2015 at 1:31 PM

    Hello Jeff,

    This script must be conflicting with your form's lightbox script and that must be causing this issue.

    Please share the webpage URL where you have embedded your lightbox form and we will take a look

    We will wait for your response.

    Thank you!

  • SegPayJeff
    Replied on July 7, 2015 at 2:19 PM

    http://e2.toccata.com/jeffsegpay/index.html

  • Mike
    Replied on July 7, 2015 at 3:07 PM

    We will probably need to use jQuery.noConflict() in this case. Although, the lightbox seems to be fine on my test page.

    https://shots.jotform.com/mike/examples/lightboxAndSlider.html

    Lightbox embed not working on webpage with custom script code Screenshot 20

    You can add the lightbox script back, and then we will be able to check it further.

    Thank you.

  • SegPayJeff
    Replied on July 7, 2015 at 3:53 PM

    You need to go to the URL I sent you.  There is an included header file, which contains the script, that you are not seeing.

     

    Do you have information on the jQuery No Script? I have no idea what that means.

  • Mike
    Replied on July 7, 2015 at 4:44 PM

    I see the script now. Please try adding the lightbox script directly to the page head section instead of the header.html file. It should fix the issue.

    Lightbox embed not working on webpage with custom script code Screenshot 20

  • SegPayJeff
    Replied on July 7, 2015 at 5:45 PM

    that did the trick, thanks!!!!