• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

jquery-3.5.1.slim.min.js conflict with lightbox++

Explorer ,
Sep 04, 2021 Sep 04, 2021

Copy link to clipboard

Copied

So I have a lightbox++ on my site (built in Dreamweaver), with a jquery I’m using on the navbar of the mobile query part of my site, and from what I’ve gathered, they’re conflicting with each other.

 

I attempted using the <script type="text/javascript">$.noConflict()</script> placed above and under the jquery script tags, as well as basically all over the place, and nothing worked.


But placing the noConflict line would reverse what worked in that moment. So if the navBar was working without the noConflict line, with the line added, it would then not work, but then lightbox would not, and vice versa. So it’s affecting something in some way.

 

I’m just not a developer or steeped enough in this stuff to get the navbar and the lightbox to simply work together.

 

Some sites I see with the presumed solution, don’t take into account noobs like me that need to be deliberately walked through on where exactly to place the noConflict line and exactly how to modify it, given my exact lines of code on my site.

 

Really frustrating.

 


Here is the test page I’m working on:
https://www.solarinkgraphics.com/index_TEST002.html

 

Here are the lightbox++ files linked in the body of my html, above the jquery:

<script src="js/prototype.js" type="text/javascript"></script>
<script src="js/scriptaculous.js?load=effects" type="text/javascript"></script>
<script src="js/lightbox++.js" type="text/javascript"></script>

<script type="text/javascript">
function GroupDelegate(id) {
var objLink = document.getElementById(id);
Lightbox.prototype.start(objLink);
}

</script>

<script type="text/javascript">
lightbox.option({
'fitImagesInViewport': true,
'wrapAround': true
})
</script>

 


Here is the jquery, and javascript file, linked in the body of my HTML, under the lightbox files:

<script src="https://code.jquery.com/jquery-3.5.1.slim.min.js" integrity="sha384-DfXdz2htPH0lsSSs5nCTpuj/zy4C+OGpamoFVy38MVBnE+IbbVYUew+OrCXaRkfj" crossorigin="anonymous"></script>
<script src="js/menu.js"></script>

 

TOPICS
Code

Views

734

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Sep 04, 2021 Sep 04, 2021

Copy link to clipboard

Copied

Instead of

 

<script src="https://code.jquery.com/jquery-3.5.1.slim.min.js" integrity="sha384-DfXdz2htPH0lsSSs5nCTpuj/zy4C+OGpamoFVy38MVBnE+IbbVYUew+OrCXaRkfj" crossorigin="anonymous"></script>

 

 

Try

 

 

<script src="https://code.jquery.com/jquery-3.6.0.js" integrity="sha256-H+K7U5CnXl1h5ywQfKtSj8PCmoN9aaq30gDh27Xc0jk=" crossorigin="anonymous"></script>
Wappler, the only real Dreamweaver alternative.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Sep 05, 2021 Sep 05, 2021

Copy link to clipboard

Copied

LATEST

I'm not surprised you have unresolved conflicts. Prototype from 2015 and Scriptaculous from 2010 are way out of date.  No recent development has occured on either one in ages.  Ditto for the original Lightbox scripts.  I think this is futile.  A better use of your time would be to get rid of the old, outdated scripts and find modern replacements.

 

I like Fancybox and Magnific.

https://alternativeto.net/software/lightbox2/

 

Or you could program your own Lightbox-type viewer with plain vanilla code.

https://www.w3schools.com/howto/howto_js_lightbox.asp

 

Hope that helps.

 

Nancy O'Shea— Product User, Community Expert & Moderator

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines