Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 8 of 8
  • Thread Tools
  • Rate This Thread
  1. #1
    New 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?

  2. #2
    New Coder
    Join Date
    Feb 2016
    Posts
    80
    Thanks
    0
    Thanked 16 Times in 16 Posts
    Have a look at the console:
    Uncaught SyntaxError: Unexpected identifier (index):16
    Code given on Pirobox website:
    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 on your site:
    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
    	});
    });

  3. #3
    New 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. - ?

  4. #4
    New 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. :/

  5. #5
    New 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.

  6. #6
    New Coder
    Join Date
    May 2015
    Posts
    16
    Thanks
    7
    Thanked 0 Times in 0 Posts
    Corrected and uploaded.

  7. #7
    New 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.

  8. #8
    The fat guy next door VIPStephan's Avatar
    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!


 

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •