Log in

View Full Version : Resolved Slide Show



marain
09-06-2020, 04:07 PM
I'm trying to implement a slide show using jquery. My model is Murach's HTML5 and CSS3, 4th Edition, page 654. (Yes I know DD offers a slide show script. I could not get IT to work either.)

The following is in my head section:



<script src='js/jquery-3.5.1.js'></script>
<script src='slide_show.js'></script>

The following is in the body:



<br />
<br />
<p style="font-size:x-large; ">If Donald Trump makes an utterance in the middle of a deserted forest, and there is nobody around who hears him, is he still lying?</p>
<br />
<section>
<h1>Trump Slide Show</h1>
<h2 id="caption">The Might Is Right House</h2>
<img id="slide" src="images/trump1.jpg" alt="">
<div id="slides">
<img src="images/trump1.jpg" alt="Trump and Pal Putin">
<img src="images/trump2.jpg" alt="The liar tweets tonight">
<img src="images/trump3.jpg" alt="Dump Trump">
</div>
</section>

And here is my CSS code:




#slides img { display: none; }

The page is at https://www.njgunlawyers.com/page.php?here=test. I have downloaded jquery-3.5.1.js into the js folder of my server. (It also does not work when I grab jquery-3.5.1.js from jquery.com and put


<script src='//code.jquery.com/jquery-3.5.1.min.js'></script>

into my head section.

Please accept my apologies for linking to this heavily political message.

A.

coothead
09-06-2020, 05:49 PM
Hi there marain,



your Slde Show script is not in the location that you have coded..

https://www.njgunlawyers.com/slide_show.js

...so start you investigation to find it. ;)


coothead

marain
09-06-2020, 07:39 PM
OK. I changed


script src='slide_show.js'></script>

to


script src='js/slide_show.js'></script>

It still does not work.

I surmised that slide_show.js was perhaps contained in jquery-3.5.1.js. That surmise appears to be incorrect. I have no idea where to find it.

You may be overestimating my abilities.

coothead
09-06-2020, 09:05 PM
Hi there marain,



there is no file with the name slide_show.js here...

https://www.njgunlawyers.com/js/slide_show.js

...either. :confused:

You need to check that the file name is correct. :cool:

Perhaps you could give us some indication of
where you got the script originally



coothead

marain
09-06-2020, 10:44 PM
I see your point. You're right--I'll have to look around for the script.

The instruction comes from Murach's HTML5 and CSS3, 4th Edition, page 654.

coothead
09-06-2020, 10:58 PM
The instruction comes from Murach's HTML5 and CSS3,
4th Edition, page 654.

unfortunately, as you may have guessed, I do not have the
benefit of that tome on my bookshelves to enlighten me. :confused:



coothead

marain
09-07-2020, 02:16 PM
Coothead,

The book lists email addresses for its two authors. I'll ask them!

A.

marain
09-13-2020, 12:42 PM
The author replied. They omitted a step from the book! Their next edition will fix it. In the meanwhile, they gave me the missing information. The slide show now works!

Thank you, Coothead!