jQuery适用于Dreamweaver,而不适用于浏览器

时间:2013-06-03 14:26:22

标签: jquery css dreamweaver

我有一个带有jQuery滑块的HTML文档。

滑块在Dreamweaver中完美运行,但是当我在浏览器上测试时,负载轮永远不会消失: - (

我可能做错了什么?

(这仍然是一项正在进行的工作,请原谅扩展页脚: - )

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Sunshine Citi Mall</title>
<style type="text/css">
<script type="text/javascript" src="jquery-1.5.1.min.js"></script>
<script type="text/javascript" src="jquery.orbit-1.2.3.min.js"></script>
<script type="text/javascript">
            $(window).load(function() {
                $('#featured').orbit();
            });
        </script>

<!--
body {
    font: 100%/1.4 Verdana, Arial, Helvetica, sans-serif;
    background: #42413C;
    margin: 0;
    padding: 0;
    color: #333;
    background-color: #FFF;
}

/* ~~ Element/tag selectors ~~ */
ul, ol, dl { /* Due to variations between browsers, it's best practices to zero padding and margin on lists. For consistency, you can either specify the amounts you want here, or on the list items (LI, DT, DD) they contain. Remember that what you do here will cascade to the .nav list unless you write a more specific selector. */
    padding: 0;
    margin: 0;
}
h1, h2, h3, h4, h5, h6, p {
    margin-top: 0;   /* removing the top margin gets around an issue where margins can escape from their containing div. The remaining bottom margin will hold it away from any elements that follow. */
    padding-right: 50px;
    padding-left: 50px;
    font-family: 'Raleway', sans-serif; /* adding the padding to the sides of the elements within the divs, instead of the divs themselves, gets rid of any box model math. A nested div with side padding can also be used as an alternate method. */
}
h1
{
    font-size:25px;
    font-family: 'Raleway', sans-serif;
}

a img { /* this selector removes the default blue border displayed in some browsers around an image when it is surrounded by a link */
    border: none;
}
/* ~~ Styling for your site's links must remain in this order - including the group of selectors that create the hover effect. ~~ */
a:link {
    color: #42413C;
    text-decoration: none; /* unless you style your links to look extremely unique, it's best to provide underlines for quick visual identification */
}
a:visited {
    color: #6E6C64;
    text-decoration: underline;
}
a:hover, a:active, a:focus { /* this group of selectors will give a keyboard navigator the same hover experience as the person using a mouse. */
    text-decoration: none;
}

/* ~~ this fixed width container surrounds the other divs ~~ */
.container {
    width: 940px;
    background: #FFF;
    margin: 0 auto;
    border-top-width: 1px;
    border-right-width: 1px;
    border-bottom-width: 1px;
    border-left-width: 1px;
    border-top-style: none;
    border-right-style: solid;
    border-bottom-style: none;
    border-left-style: solid;
    border-top-color: #CCC;
    border-right-color: #CCC;
    border-bottom-color: #CCC;
    border-left-color: #CCC;
    font-size:15px;
         /* the auto value on the sides, coupled with the width, centers the layout */
}

/* ~~ the header is not given a width. It will extend the full width of your layout. It contains an image placeholder that should be replaced with your own linked logo ~~ */
.header {
    background: #fff;
}
.logo {
    padding-left: 20px;
    padding-top: 20px;
    padding-right: 20px;
    }


/* ~~ This is the layout information. ~~ 

1) Padding is only placed on the top and/or bottom of the div. The elements within this div have padding on their sides. This saves you from any "box model math". Keep in mind, if you add any side padding or border to the div itself, it will be added to the width you define to create the *total* width. You may also choose to remove the padding on the element in the div and place a second div within it with no width and the padding necessary for your design.

*/

.content {

    padding: 10px 0;
}

/* ~~ The footer ~~ */
.footer {
    padding: 10px 0;
    background-color: #CCC;
    font-size: 11px;
}
.bottomslider {
    padding: 10px 0;
    background: #fff;
    height: 450px;
}
/* ~~ miscellaneous float/clear classes ~~ */
.fltrt {  /* this class can be used to float an element right in your page. The floated element must precede the element it should be next to on the page. */
    float: right;
    margin-left: 8px;
}
.fltlft { /* this class can be used to float an element left in your page. The floated element must precede the element it should be next to on the page. */
    float: left;
    margin-right: 8px;
}
.clearfloat { /* this class can be placed on a <br /> or empty div as the final element following the last floated div (within the #container) if the #footer is removed or taken out of the #container */
    clear:both;
    height:0;
    font-size: 1px;
    line-height: 0px;
}
.headertxt {
    font-size: 17px;
    float: right;
    width: 600px;
    position: static;
    line-height: 5px;
    padding-top: 40px;
    color:#666;
}


-->
</style>



<script src="SpryAssets/SpryMenuBar.js" type="text/javascript"></script>
<link href="SpryAssets/SpryMenuBarHorizontal.css" rel="stylesheet" type="text/css" />
<link rel="stylesheet" href="slider.css">
<link rel="stylesheet" href="slide.css">

        <link rel="stylesheet" type="text/css" href="css/style.css" />
        <link rel="stylesheet" type="text/css" href="css/jquery.jscrollpane.css" media="all" />
        <link href='http://fonts.googleapis.com/css?family=Raleway:200' rel='stylesheet' type='text/css'>





</head>

<body>

<div class="container">
  <div class="header"><div class="logo"><a href="#"><img src="logo.png" width="180" height="170" alt="logo" name="logo" id="logo" style="background: #fff; display:block;" align="left" /></a>
    <div class="headertxt">
      <p><strong>Sunshine Citi Mall...</strong></p>
      <p>Preserving the culture and history of the people of Kumasi.</p>
</div>
    <ul id="MenuBar1" class="MenuBarHorizontal">
      <li><a href="#"><strong>HOME</strong></a></li>
      <li><a href="#"><strong>PROJECT</strong></a></li>
      <li><a href="#"><strong>PARTIES INVOLVED</strong></a></li>
      <li><a href="#"><strong>CONTACT US</strong></a></li>
  </ul> 

    <!-- end .header --></div></div>
    <div class="container">


    <p>&nbsp;</p>
    <div id="featured"> 

            <img src="slide-images/1.jpg" />
            <img src="slide-images/2.jpg"  />
            <img src="slide-images/3.jpg"  />
      </div>
      <h1></h1>
    <h1>About the Sunshine Citi Mall</h1>
    <p>Welcome to the Sunshine Citi Mall, a proud development by Kenbert Group Limited, Novare Africa Property Fund I and Group Five Property Development.
    <p>
      The development of the Sunshine Citi Mall will play an important role in preserving the culture and history of the people of Kumasi. The development is expected to accelerate the expansion of the Kumasi metropolis, create employment opportunities, boost tourism and contribute to the transformation of this underutilised area into a thriving commercial hub.</p>
<!-- end .content --></div>
<div class="bottomslider">
<div id="ca-container" class="ca-container">
                <div class="ca-wrapper">
                    <div class="ca-item ca-item-1">
                  <div class="ca-item-main">
                            <div class="ca-icon"></div>

                  </div>

                    </div>
                    <div class="ca-item ca-item-2">
                  <div class="ca-item-main">
                            <div class="ca-icon"></div>

                        </div>

              </div>
                    <div class="ca-item ca-item-3">
                  <div class="ca-item-main">
                            <div class="ca-icon"></div>

                        </div>

              </div>
                    <div class="ca-item ca-item-4">
                        <div class="ca-item-main">
                            <div class="ca-icon"></div>

                        </div>



            </div>

        </div>
        <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js"></script>
        <script type="text/javascript" src="js/jquery.easing.1.3.js"></script>
        <!-- the jScrollPane script -->
        <script type="text/javascript" src="js/jquery.mousewheel.js"></script>
        <script type="text/javascript" src="js/jquery.contentcarousel.js"></script>
        <script type="text/javascript">
            $('#ca-container').contentcarousel();
        </script>
</div>
  <div class="footer">
    <p><a href="#">HOME</a> | <a href="#">PROJECTS</a> | <a href="#">PARTIES INVOLVED</a> | <a href="#">CONTACT US</a></p>
    <p>Copyright 2013. All rights reserved. <a href="#">Disclaimer</a>.</p>
    <!-- end .footer --></div>
  <!-- end .container --></div>
  </div>
<script type="text/javascript">
var MenuBar1 = new Spry.Widget.MenuBar("MenuBar1", {imgDown:"SpryAssets/SpryMenuBarDownHover.gif", imgRight:"SpryAssets/SpryMenuBarRightHover.gif"});
</script>
</body>
</html>

2 个答案:

答案 0 :(得分:4)

是的,就像我刚才在评论中所说的那样,删除第234行中第二个jQuery实例。

<script type="text/javascript" 
src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js">
</script>

答案 1 :(得分:1)