Jump to content

This script work in html, but not in processwire/php


Recommended Posts

Hi, I am building a site on my pc.
On the pc, in html, this script that handles a dynamic background works great. 
But when I transfer everything online with processwire system, nothing works.
I think I need to change the paths, but I have no idea. Shouldn't they work anyway?

 

$(function() {
    $('body').vegas({
		
		shuffle: false,
		
		cover: true,
		
		delay: 9000,
		
		transitionDuration: 2000,
		
		transition: [ 'fade', 'fade2', 'zoomOut', 'swirlLeft', 'swirlRight2', 'flash', 'flash2' ],
		
		timer: false,
	
        slides: [
            { src: '../../site/templates/styles/assets/img/1.jpg' },
            { src: '../../site/templates/styles/assets/img/2.jpg' },
			{ src: '../../site/templates/styles/assets/img/3.jpg' },			
            { src: '../../site/templates/styles/assets/img/4.jpg' },
			{ src: '../../site/templates/styles/assets/img/5.jpg' },			
            { src: '../../site/templates/styles/assets/img/6.jpg' },			
			
			
        ],
		
		overlay: '../../site/templates/styles/assets/plugins/vegas/overlays/05.png'


    });
});

This script is called in the .php file by 

		<script rel="stylesheet" src="<?php echo $config->urls->templates?>styles/assets/plugins/lasvegas-244/lasvegas-244-po.js"></script>

 

 

Link to comment
Share on other sites

Please open the dev tools of your browser and take a look if there are errors in the console or if there are 404 errors in the network panel.

I think that the paths might be wrong. In dev tools network tab you will see from where the browser tries to load the assets.

Also the rel="stylesheet" in your script tag absolutely makes no sense, please remove it.

  • Like 2
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...