Enjoy an ad free experience by logging in. Not a member yet? Register.
|
|
Results 1 to 8 of 8
Thread: jQuery scripts conflicting
-
03-25-2016, 10:21 PM #1New Coder
- Join Date
- May 2015
- Posts
- 16
- Thanks
- 7
- Thanked 0 Times in 0 Posts
jQuery scripts conflicting
Please see My Final Website
This mock website uses two jquery scripts. One is for a one-page scrolling website, and the other is a Pirobox photo gallery. I think the two scripts are incompatible and I'm wondering if there's anything I can do to fix it. The first script (for scrolling) is on the index html page (as instructed) right before the closing </body> tag. The other script, for the Pirobox script(s) is in its own folder called "pirobox". These two seem to be incompatible, as Pirobox does not behave correctly (see "Pet Gallery" page and link above) and also, even though the .css is completely separate (and you may have to reload the page to see it but when the page loads it shows a padding-top of 200px or so until you refresh, then it's right) the piro css overtakes my css with certain things on the page. I'll figure out the css; mainly, I just want the two scripts to work together. Can anyone tell me what to do to fix?
-
03-25-2016, 11:07 PM #2New Coder
- Join Date
- Feb 2016
- Posts
- 80
- Thanks
- 0
- Thanked 16 Times in 16 Posts
Have a look at the console:
Code given on Pirobox website:Uncaught SyntaxError: Unexpected identifier (index):16
Code on your site:Code:$(document).ready(function() { $().piroBox_ext({ piro_speed : 900, bg_alpha : 0.1, piro_scroll : true //pirobox always positioned at the center of the page }); });
Code:$(document).ready(function() { $()pirobox/.piroBox_ext({ piro_speed : 700, bg_alpha : 0.5, piro_scroll : true // pirobox always positioned at the center of the page }); });
-
03-25-2016, 11:31 PM #3New Coder
- Join Date
- May 2015
- Posts
- 16
- Thanks
- 7
- Thanked 0 Times in 0 Posts
I don't understand. I replaced the code with your code. All that does is change the alpha and the speed. - ?
-
03-25-2016, 11:38 PM #4New Coder
- Join Date
- May 2015
- Posts
- 16
- Thanks
- 7
- Thanked 0 Times in 0 Posts
I realize the line 16:
$()pirobox/.piroBox_ext({
was modified, as I was trying different things, but it doesn't make any difference. :/
-
03-25-2016, 11:56 PM #5New Coder
- Join Date
- Feb 2016
- Posts
- 80
- Thanks
- 0
- Thanked 16 Times in 16 Posts
This is wrong:
$()pirobox/.piroBox_ext({
This is correct:
$().piroBox_ext({
Correct it and upload. Then we'll have a look again.
-
03-26-2016, 12:19 AM #6New Coder
- Join Date
- May 2015
- Posts
- 16
- Thanks
- 7
- Thanked 0 Times in 0 Posts
Corrected and uploaded.
-
03-26-2016, 12:47 AM #7New Coder
- Join Date
- Feb 2016
- Posts
- 80
- Thanks
- 0
- Thanked 16 Times in 16 Posts
The problem is that both plugins use different versions of jQuery. Pirobox uses a highly outdated one: 1.4.4
My local time is 00:46 AM. Will finish this now and continue tomorrow. Consider using a lightbox that is more up-to-date.
-
03-26-2016, 07:24 AM #8The fat guy next door
- Join Date
- Jan 2006
- Location
- Halle (Saale), Germany
- Posts
- 9,808
- Thanks
- 6
- Thanked 1,159 Times in 1,130 Posts
And read the freakin’ sticky!



Reply With Quote
