简体   繁体   English

HTML / JQuery的简单解决方案?

[英]Simple solution for HTML/JQuery?

Excuse my ignorance if this is easily answered! 如果这很容易解决,请原谅我的无知!

Based on content sliders using <ul> with individual <li> for slides...Should this code work? 基于将<ul>与单独的<li>用于幻灯片的内容滑块...此代码行得通吗?

<ul class="bxslider">
    <li> <script type ="text/javascript" src="locationofjscontent1")</li>
    <li> <script type ="text/javascript" src="locationofjscontent2")</li>
    <li> <script type ="text/javascript" src="locationofjscontent3")</li>
</ul>

Currently using a jQuery slider (boxslider) and within the different slides (max 3) I am trying to insert an extrnal javascript/jquery slider. 目前正在使用jQuery滑块(boxslider),并且在不同的幻灯片中(最多3个),我试图插入一个外部javascript / jquery滑块。

Slider works, but content only shows in first slide and not the others. 滑块可以工作,但内容仅显示在第一张幻灯片中,而不显示在其他幻灯片中。

Any help greatly received! 任何帮助大受好评!

Thanks 谢谢

Surely you want to close the <script> tags? 您确定要关闭<script>标签吗?

<li><script src="file.js"></script></li>

Though, I'm going to suggest you really don't do this as it's bad practice to litter script tags amongst your HTML. 不过,我建议您不要这样做,因为在HTML中乱扔脚本标记是一种不好的做法。 Ideally they should all be placed at the bottom of your code before the closing </body> tag. 理想情况下,它们都应该放在</body>标记之前的代码底部。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM