JavaScript:JQuery UI选项卡不会加载我的其他HTML页面

时间:2017-06-25 11:51:37

标签: javascript jquery jquery-ui

所以问题是我在我的网站上添加了来自JQuery UI的Tabs,现在我的包含段落的标签加载得很好但是我链接到其他html页面的标签(不包含标签),它们不会加载。这是我的.js文件代码和.html代码:

$(function(){
	$("#tabs").tabs();	
	
});
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<!DOCTYPE html>
<html>
<head>
  <title id="myTitle">Persistant Programmer: Testing Website</title>
  <script type="text/javascript" src="https://ajax.aspnetcdn.com/ajax/jquery/jquery-3.2.1.min.js"></script>
  <script type="text/javascript" src="https://ajax.aspnetcdn.com/ajax/jquery.ui/1.12.1/jquery-ui.min.js"></script>
  <script type="text/javascript" src="script17.js"></script>
  <link rel="stylesheet" type="text/css" href="https://ajax.aspnetcdn.com/ajax/jquery.ui/1.12.1/themes/excite-bike/jquery-ui.css" />
  
</head>
<body>

<div id="tabs">
  <ul>
    <li><a href="#tabs-1">About Me</a></li>
    <li><a href="game.html">Click-Picture Game</a></li>
    <li><a href="catgame/catGame.html">Feed the Cat Game</a></li>
  </ul>
  <div id="tabs-1">
    <p>Hello there! Welcome to my Website. My name is Syed Hammad Jaffery, studying in FAST-NUCES. Purpose of this site is just a playground for my JavaScript Codes. JavaScript is something which is really basic need in today's world, there couldn't exist any web which only runs with HTML5 and CSS3. We need JavaScript to give some living feature to our webpages on which they can act and do stuff dynamically <br></br>I know this web is really newbie version and possibly not even shown on Search Engines but still Thanks for visiting.</p>
  </div>
</div>



</body>
</html>

我已将game.html放在与此html文件相同的文件夹中,并将catGame.html放在名为catgame的文件夹中,该文件夹与我的html文件位于同一目录中。

有一天,我被困在它上面,我是一个非常新的JavaScript在线学习了一些教程。从这里尝试了所有内容http://jqueryui.com/tabs/#ajax

感谢Anticipation

1 个答案:

答案 0 :(得分:0)

据我所知,不可能直接使用jQuery UI标签。 您可以使用一些jQuery技巧as this answer

来完成
相关问题