Jquery不在MVC中工作 [英] Jquery not working in MVC
本文介绍了Jquery不在MVC中工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
运行程序后,它不显示浏览器中的选项卡: -
After run the program it don't shows the tab in browser:-
@Scripts.Render("~/bundles/JUIJS")
@Styles.Render("~/Content/JUICSS")
<script src="//code.jquery.com/jquery-1.10.2.js"></script>
<script src="//code.jquery.com/ui/1.11.4/jquery-ui.js"></script>
<link rel="stylesheet" href="/resources/demos/style.css">
<script type="text/javascript">
$(document).ready(function () {
$("#tab").tabs();
});
</script>
<div>
<div id="tab">
<ul class="ui-tabs">
<li><a href="#tabs-1">Tab 1</a></li>
<li><a href="#tabs-2">Tab 2</a></li>
<li><a href="#tabs-3">Tab 3</a></li>
</ul>
<div id="tabs-1">
<p>In Tab one</p>
</div>
<div id="tabs-2">
<p>In Tab Two</p>
</div>
<div id="tabs-3">
<p>In Tab Three</p>
</div>
</div>
</div>
推荐答案
( document )。ready( function (){
(document).ready(function () {
( #tab 跨度>)选项卡();
});
< / script >
< div >
< div id = 标签 >
< < span class =code-leadattribute> ul class = ui-tabs >
< li > < a href = #tabs-1 > 标签1 < / a > < / li >
< li > < a href = #tabs-2 > 标签2 < / a 跨度> <温泉n class =code-keyword>> < / li >
< li > < a href = #tabs -3 > 标签3 < / a > < / li >
< / ul >
< div id = tabs-1 >
< p > 在标签一中< / p >
< / div >
< div id = tabs-2 >
< p > 在标签二中< / p >
< / div >
< div id = < span class =code-keyword> tabs-3 >
< p > 在标签三中< / p >
< ; / div >
< / div >
< / div >
("#tab").tabs(); }); </script> <div> <div id="tab"> <ul class="ui-tabs"> <li><a href="#tabs-1">Tab 1</a></li> <li><a href="#tabs-2">Tab 2</a></li> <li><a href="#tabs-3">Tab 3</a></li> </ul> <div id="tabs-1"> <p>In Tab one</p> </div> <div id="tabs-2"> <p>In Tab Two</p> </div> <div id="tabs-3"> <p>In Tab Three</p> </div> </div> </div>
试试这个
try this
<link rel="stylesheet" href="http://code.jquery.com/ui/1.11.4/themes/smoothness/jquery-ui.css">
<script src="http://code.jquery.com/jquery-1.10.2.js"></script>
<script src="http://code.jquery.com/ui/1.11.4/jquery-ui.js"></script>
<script>
这篇关于Jquery不在MVC中工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文