Asp.net - 为什么手风琴不起作用? [英] Asp.net - why is accordion not working?

查看:87
本文介绍了Asp.net - 为什么手风琴不起作用?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图在ASP.NET(MVC)中使用Semantic UI制作手风琴但是它不能正常工作.Below是我的代码



什么我试过了:



I tried to make an accordion using Semantic UI in ASP.NET(MVC) but it is not working..Below is my code

What I have tried:

@{
    ViewBag.Title = "Index";
}

<html>
<head>
    <title>MVC Semantic</title>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <meta http-equiv="Content-Style-Type" content="text/css" />

<script src="../../Scripts/jquery-3.1.1.min.js" type="text/javascript"></script>
<script src="../../semantic/minified/modules/accordion.js" type="text/javascript"></script>
<script src="../../semantic/packaged/javascript/semantic.min.js" type="text/javascript"></script>
<link href="../../semantic/minified/modules/accordion.min.css" rel="stylesheet" type="text/css" />

<script type="text/javascript" language='javascript'>
    $(document).ready(function () {

        $('.ui.accordion').accordion();
    });

</script>

</head>
<body>

<div class="ui accordion">
  <div class="active title">
    
    What is a dog?
  </div>
  <div class="active content">
    <p>A dog is a type of domesticated animal. Known for its loyalty and faithfulness, it can be found as a welcome guest in many households across the world.</p>
  </div>
  <div class="title">
    
    What kinds of dogs are there?
  </div>
  <div class="content">
    <p>There are many breeds of dogs. Each breed varies in size and temperament. Owners often select a breed of dog that they find to be compatible with their own lifestyle and desires from a companion.</p>
  </div>
  <div class="title">
    
    How do you acquire a dog?
  </div>
  <div class="content">
    <p>Three common ways for a prospective owner to acquire a dog is from pet shops, private owners, or shelters.</p>
    <p>A pet shop may be the most convenient way to buy a dog. Buying a dog from a private owner allows you to assess the pedigree and upbringing of your dog before choosing to take it home. Lastly, finding your dog from a shelter, helps give a good home to a dog who may not find one so readily.</p>
  </div>
</div>

</body>
</html>





请帮帮我:(



Please help me :(

推荐答案

(document).ready(function(){
(document).ready(function () {


('。ui.accordion')。accordion();
});

< / script>

< / head>
< body>

< div class =ui accordion>
< div class =active title>

什么是狗?
< / div>
< div class =active content>
< p>狗是一种驯养的动物。它以忠诚和忠诚而闻名,它可以作为一个受欢迎的客人在全国各地的许多家庭中找到世界。< / p>
< / div>
< div class =title>

那里有哪种狗?
< / div>
< div class =content>
< p>狗品种繁多。每个品种都有所不同大小和气质。业主经常选择一种狗的品种在他们发现与自己的生活方式和伴侣的愿望兼容。< / p>
< / div>
< div class =title>

你如何获得一只狗?
< / div>
< div class =content>
< p>潜在的拥有者获取狗的三种常见方式来自宠物商店,私人所有者或庇护所。< / p>
< p>宠物店可能是买狗的最便捷方式。从私人所有者处购买狗狗可以让您在选择带回家之前评估您的狗的血统和成长。最后,从一个避难所找到你的狗,有助于给一个可能不那么容易找到它的狗提供一个好的家。< / p>
< / div>
< / div>

< / body>
< / html>
('.ui.accordion').accordion(); }); </script> </head> <body> <div class="ui accordion"> <div class="active title"> What is a dog? </div> <div class="active content"> <p>A dog is a type of domesticated animal. Known for its loyalty and faithfulness, it can be found as a welcome guest in many households across the world.</p> </div> <div class="title"> What kinds of dogs are there? </div> <div class="content"> <p>There are many breeds of dogs. Each breed varies in size and temperament. Owners often select a breed of dog that they find to be compatible with their own lifestyle and desires from a companion.</p> </div> <div class="title"> How do you acquire a dog? </div> <div class="content"> <p>Three common ways for a prospective owner to acquire a dog is from pet shops, private owners, or shelters.</p> <p>A pet shop may be the most convenient way to buy a dog. Buying a dog from a private owner allows you to assess the pedigree and upbringing of your dog before choosing to take it home. Lastly, finding your dog from a shelter, helps give a good home to a dog who may not find one so readily.</p> </div> </div> </body> </html>





请帮帮我:(



Please help me :(


<html lang="en"><head></head><body><!doctype html>


  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <title>jQuery UI Accordion - Default functionality</title>
  <link rel="stylesheet" href="//code.jquery.com/ui/1.12.1/themes/base/jquery-ui.css">
  <link rel="stylesheet" href="/resources/demos/style.css">
  <script src="https://code.jquery.com/jquery-1.12.4.js"></script>
  <script src="https://code.jquery.com/ui/1.12.1/jquery-ui.js"></script>
  <script>


这篇关于Asp.net - 为什么手风琴不起作用?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆