/    Sign up×
Community /Pin to ProfileBookmark

Problems with a sliders in webpage after moving to xampp.

I was building a website in html and then decided to learn some php so install xampp and converted some pages to php so that I could follow some tutorials on Udemy.

I have two sliders, one is fotorama and the other bxslider, the latter I intend to remove at some point.

These both worked fine, and still do when they were in .html outside of xampp. Since I have converted to .php and placed in htdocs folder the sliders no longer work.

I have checked all file paths successully. I have tried local and gooleapi version of jquery as well as older versions. Other jquery aspects that I use such as waypoints works fine on my site and there are no red errors with any of the google dev tool network section.

The only difference since moving is that I now get this error in the Chrome console. This doesnt appear outside of xampp in the html format.

jquery.min.js:2 Uncaught TypeError: e.php is not a function
at fotorama.js:5
at G (fotorama.js:4)
at HTMLDivElement.<anonymous> (fotorama.js:5)
at Function.each (jquery.min.js:2)
at k.fn.init.each (jquery.min.js:2)
at k.fn.init.d.fn.fotorama (fotorama.js:5)
at HTMLDocument.<anonymous> (fotorama.js:5)
at e (jquery.min.js:2)
at t (jquery.min.js:2)

and

jquery-3.5.1.min.js:2 Uncaught TypeError: slider.pagerEl.php is not a function
at populatePager (jquery.bxslider.js:636)
at appendPager (jquery.bxslider.js:654)
at setup (jquery.bxslider.js:265)
at init (jquery.bxslider.js:185)
at S.fn.init.$.fn.bxSlider (jquery.bxslider.js:1599)
at HTMLDocument.<anonymous> (mowjscript.js:20)
at e (jquery-3.5.1.min.js:2)
at t (jquery-3.5.1.min.js:2)

I am assuming it is because of this? Can anyone tell me how I can fix this issue without editing the sliders?

I researched from 8 -8 yeasterday and am at breaking point so I figured I would ask for help. The 12hrs Googling didnt help me out much.

Thanks in advance πŸ™‚.

to post a comment
HTMLJavaScript

7 Comments(s) ↴

Copy linkTweet thisAlerts:
@SempervivumJul 08.2020 β€”Β Since I have converted to .php and placed in htdocs folder the sliders no longer work.[/quote]Please describe detailed what you did when converting to php. Is that page available online?
Copy linkTweet thisAlerts:
@JR1983authorJul 08.2020 β€”Β @Sempervivum#1620388 I have just changed the .html to .php to so that I can use an php include tag to include a footer.

It is not available online .
Copy linkTweet thisAlerts:
@SempervivumJul 08.2020 β€”Β @JR1983#1620389 Please post the section of code where you initialise the bx slider some elements of the HTML for this slider.
Copy linkTweet thisAlerts:
@JR1983authorJul 08.2020 β€”Β @Sempervivum#1620390

At the bottom of my html page i have this:-

<script src ="js/mowjscript.js"></script>


which leads to this:-

/*jslint browser: true */

/*
global $, document */


$(document).ready(function () {


$('.pitch-wrap').waypoint(function (direction) {
if (direction === "down") {
$('.menu').addClass('scroll');
} else {
$('.menu').removeClass('scroll');
}
}, {
offset: '-70%'
});


$('.img-carousel').bxSlider();


});

HTML is this

<div class="img-carousel-wrap">

<div class="img-carousel">

<div>

<img src ="http://localhost/website/img/SALT.jpg" alt="s" width="500px";>

</div>

<div>

<img src ="http://localhost/website/img/salt.jpg" alt="s">

</div>

<div>

<img src ="img/SALT.jpg" alt="s">

</div>

<div>

<img src ="img/SALT.jpg" alt="s">

</div>

</div>

</div>
Copy linkTweet thisAlerts:
@SempervivumJul 08.2020 β€”Β I do not recommend using absolute paths like this:

`&lt;img src ="http://localhost/website/img/SALT.jpg" alt="s" width="500px";&gt;`

Use relative paths instead.
Copy linkTweet thisAlerts:
@JR1983authorJul 08.2020 β€”Β @Sempervivum#1620393 I was trying both methods and left it unchanged as there were a few google posts that said to try changing paths but neither method fixed my issue.
Copy linkTweet thisAlerts:
@JR1983authorJul 08.2020 β€”Β @Sempervivum#1620393 thanks for taking a look. Just had to restore from a backup. No idea what was wrong!
Γ—

Success!

Help @JR1983 spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 β€” BETA 5.4,
whats_new: community page,
up_next: more Davinciβ€’003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinciβ€’003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,

tipper: @Samric24,
tipped: article
amount: 1000 SATS,
)...