Javascript Jquery ui主题不应用于html

Javascript Jquery ui主题不应用于html,javascript,jquery,jquery-ui,Javascript,Jquery,Jquery Ui,我正在编写HTML代码,我在部分添加了链接,用于访问一个名为“start”的特定jQueryUI主题。但是,我不知道为什么jQueryUI主题没有呈现或应用到我的HTML文件中 这是代码 <!doctype html> <html> <head> <link href="http://code.jquery.com/ui/1.10.4/themes/start/jquery-ui.css" rel="stylesheet"> <script

我正在编写HTML代码,我在
部分添加了链接,用于访问一个名为“start”的特定jQueryUI主题。但是,我不知道为什么jQueryUI主题没有呈现或应用到我的HTML文件中

这是代码

<!doctype html>
<html>
<head>
<link href="http://code.jquery.com/ui/1.10.4/themes/start/jquery-ui.css" rel="stylesheet">
<script src="http://code.jquery.com/jquery-1.10.2.js"></script>
<script src="http://code.jquery.com/ui/1.10.4/jquery-ui.js"> </script>
<script src = "https://ajax.googleapis.com/ajax/libs/jquery/2.1.4/jquery.min.js"></script>
</head>
<body>
<div id = "wrapper">

<script type = "text/javascript">

$(document).ready(function() {
    $(".shMenu").menu({
      position:{
        my: "center top"
        at: "center bottom"
    }

   });

});




</script>

<style>


    #wrapper {
    width:500px;
    margin:auto;
    }

    .ui-menu {
    width:15em;
    }

    #cartDiv {
    border-style:solid;
    border-width:5px;
    }








</style>

<ul class = "shMenu">
<li><a href = "Javascript:void(0)">Super Heroes</a></li>
    <ul>
        <li><a href = "Javascript:void(0)">Hulk</a></li>
        <li><a href = "Javascript:void(0)">Batman</a></li>
        <li><a href = "Javascript:void(0)">Spider-Man</a></li>
        </li><a href = "Javascript:void(0)">Thor</a></li>
    </ul>

<li><a href = "Javascript:void(0)">Comic Books</a></li>
    <ul>
        <li><a href = "Javascript:void(0)">Hulk</a></li>
        <li><a href = "Javascript:void(0)">Batman</a></li>
        <li><a href = "Javascript:void(0)">Spider-Man</a></li>
        <li><a href = "Javascript:void(0)">Thor</a></li>
    </ul>

</ul>  



<div id = "accordion">
<h3>Batman</h3>
<p>A young Bruce Wayne (Christian Bale) travels to the Far East,
where he's trained in the martial arts by Henri Ducard (Liam Neeson),
a member of the mysterious League of Shadows. When Ducard reveals the   League's true purpose
-- the complete destruction of Gotham City -- Wayne returns to Gotham intent on cleaning up the city without resorting to murder.
With the help of Alfred (Michael Caine), his loyal butler, and Lucius Fox (Morgan Freeman),
a tech expert at Wayne Enterprises, Batman is born.</p>
</div>


<h3>Thor</h3>
<div>
<p>As the son of Odin (Anthony Hopkins), king of the Norse gods,
Thor (Chris Hemsworth) will soon inherit the throne of Asgard from his aging
father. However, on the day that he is to be crowned, Thor reacts with brutality when the gods' enemies,
the Frost Giants, enter the palace in violation of their treaty. As punishment, Odin banishes Thor to Earth. While Loki (Tom Hiddleston),
Thor's brother, plots mischief in Asgard,
Thor, now stripped of his powers, faces his greatest threat..</p>
</div>


<h3>SpiderMan</h3>
<div>
<p>"Spider-Man" centers on student Peter Parker (Tobey Maguire) who, 
after being bitten by a genetically-altered spider, gains superhuman
strength and the spider-like ability to cling to any surface. He vows
to use his abilities to fight crime, coming to understand the words of his
beloved Uncle Ben:
"With great power comes great responsibility."</p>
</div>


<div id = "shTabs">
<ul>
    <li><a href = "#ironman">Ironman</a></li>
    <li><a href = "#hulk">Hulk</a></li>
    <li><a href = "#thor">thor</a></li>
    <li><a href = "#spiderman">SpiderMan</a></li>
</ul>
</div>

<div id = "ironman">
A billionaire industrialist and genius inventor, Tony Stark (Robert Downey Jr.),
is conducting weapons tests overseas, but terrorists kidnap him to force him to build a devastating 
weapon. Instead, he builds an armored suit and upends his captors. Returning to America,
Stark refines the suit and uses it to combat crime and terrorism.

</div>

<div id = "hulk">
Eric Bana ("Black Hawk Down") stars as scientist Bruce Banner, 
whose inner demons transform him in the aftermath of a catastrophic experiment;
Jennifer Connelly portrays Betty Ross, whose scientific genius unwittingly helps unleash the Hulk; 
Nick Nolte plays Banner's brilliant father, who passes on a tragic legacy to his son; and Sam Elliott
portrays the commander of a top-secret military research center.

</div>

<div id = "thor">
As the son of Odin (Anthony Hopkins), king of the Norse gods,
Thor (Chris Hemsworth) will soon inherit the throne of Asgard from his aging
father. However, on the day that he is to be crowned, Thor reacts with brutality when the gods' enemies,
the Frost Giants, enter the palace in violation of their treaty. As punishment, Odin banishes Thor to Earth. While Loki (Tom Hiddleston),
Thor's brother, plots mischief in Asgard,
Thor, now stripped of his powers, faces his greatest threat..

</div>

<div id = "spiderman">
"Spider-Man" centers on student Peter Parker (Tobey Maguire) who, 
after being bitten by a genetically-altered spider, gains superhuman
strength and the spider-like ability to cling to any surface. He vows
to use his abilities to fight crime, coming to understand the words of his
beloved Uncle Ben:
"With great power comes great responsibility."

</div>
</div>


</body>
</html>

$(文档).ready(函数(){
$(“.shMenu”).menu({
职位:{
我的:“中上”
在“中底”
}
});
});
#包装纸{
宽度:500px;
保证金:自动;
}
.ui菜单{
宽度:15em;
}
#卡特夫{
边框样式:实心;
边框宽度:5px;
}
蝙蝠侠 年轻的布鲁斯·韦恩(克里斯蒂安·贝尔饰)前往远东, 他在那里接受亨利·杜卡德(利亚姆·尼森饰)的武术训练, 神秘阴影联盟的成员。当杜卡德透露联盟的真正目的时 --高谭市的彻底毁灭——韦恩返回高谭市,意图在不诉诸谋杀的情况下清理城市。 在他的忠实管家阿尔弗雷德(迈克尔·凯恩)和卢修斯·福克斯(摩根·弗里曼)的帮助下, 作为韦恩企业的技术专家,蝙蝠侠诞生了

雷神 作为挪威众神之王奥丁(安东尼·霍普金斯饰)的儿子, 托尔(克里斯·海姆斯沃思饰)不久将继承阿斯加德的王位 父亲。然而,在他即将加冕的那天,当众神的敌人, 弗罗斯特巨人违反条约进入宫殿。作为惩罚,奥丁将托尔放逐到地球。而洛基(汤姆·希德尔斯顿), 托尔的兄弟在阿斯加德策划恶作剧, 托尔,现在被剥夺了他的权力,面临着他最大的威胁

蜘蛛侠 《蜘蛛侠》以学生彼得·帕克(托比·马奎尔饰)为中心, 被转基因蜘蛛咬伤后,获得超人 力量和蜘蛛般的附着任何表面的能力。他发誓 用自己的能力去打击犯罪,去理解他的话 亲爱的本叔叔: “权力越大,责任越大。”

亿万富翁、实业家和天才发明家托尼·斯塔克(小罗伯特·唐尼饰), 他正在海外进行武器试验,但恐怖分子绑架了他,迫使他建造毁灭性的核电站 武器。取而代之的是,他建造了一套装甲服,并颠覆了绑架他的人。回到美国, 斯塔克改进了这套西装,并将其用于打击犯罪和恐怖主义。 埃里克·巴纳(《黑鹰坠落》)饰演科学家布鲁斯·班纳, 在一次灾难性的实验后,他的内心恶魔改变了他; 詹妮弗·康纳利饰演贝蒂·罗斯,她的科学天才无意中帮助释放了绿巨人; 尼克·诺尔特饰演班纳杰出的父亲,他将悲剧遗产传给了儿子;还有萨姆·艾略特 描绘了一个绝密军事研究中心的指挥官。 作为挪威众神之王奥丁(安东尼·霍普金斯饰)的儿子, 托尔(克里斯·海姆斯沃思饰)不久将继承阿斯加德的王位 父亲。然而,在他即将加冕的那天,当众神的敌人, 弗罗斯特巨人违反条约进入宫殿。作为惩罚,奥丁将托尔放逐到地球。而洛基(汤姆·希德尔斯顿), 托尔的兄弟在阿斯加德策划恶作剧, 托尔,现在被剥夺了他的权力,面临着他最大的威胁。。 《蜘蛛侠》以学生彼得·帕克(托比·马奎尔饰)为中心, 被转基因蜘蛛咬伤后,获得超人 力量和蜘蛛般的附着任何表面的能力。他发誓 用自己的能力去打击犯罪,去理解他的话 亲爱的本叔叔: “权力越大,责任越大。”
您应该会在浏览器控制台中遇到错误,
菜单()
不是函数。始终检查浏览器控制台是否有错误

这是因为您要加载jQuery.js两次,第二次加载是在加载jQueryUI.js之后,这将有效地消除它

只加载jQuery.js一次…在加载所有依赖插件和代码之前

尝试更改:

<head>
  <link href="http://code.jquery.com/ui/1.10.4/themes/start/jquery-ui.css" rel="stylesheet">
  <script src="http://code.jquery.com/jquery-1.10.2.js"></script>
  <script src="http://code.jquery.com/ui/1.10.4/jquery-ui.js"></script>
  <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.4/jquery.min.js"></script>
</head>



如果您需要支持较旧的浏览器,请使用jQuery的
1.xx
系列。js

没有注意到我加载了两次jQuery。很好的提示。
<head>
  <link href="http://code.jquery.com/ui/1.10.4/themes/start/jquery-ui.css" rel="stylesheet">
  <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.4/jquery.min.js"></script>
  <script src="http://code.jquery.com/ui/1.10.4/jquery-ui.js"></script>      
</head>