2014-04-22 4 views
0

Je suis nouveau sur MVC et je prévois d'utiliser l'accordéon. Quand j'ai essayé d'ajouter toutes les références pour jquery accordéon et create div, l'accordéon n'existe pas/apparaît.jQuery Accordéon en MVC

Voici mon code.

@{ 
    ViewBag.Title = "Online Coach Tracker | Workforce Reporting and Business  Intelligence"; 
} 

<html xmlns="http://www.w3.org/1999/xhtml"> 
    <head runat="server"> 
     <title></title> 
     <link rel="stylesheet" href="../../development-bundle/themes/base/jquery.ui.all.css"> 
     <script src="../../js/jquery-1.10.2.js"></script> 
     <script src="../../development-bundle/ui/jquery.ui.core.js"></script> 
     <script src="../../development-bundle/ui/jquery.ui.widget.js"></script> 
     <script src="../../development-bundle/ui/jquery.ui.accordion.js"></script> 
     <link rel="stylesheet" href="../../development-bundle/demos/demos.css"> 
     <script> 
      $(function() { 
       $("#accordion").accordion({ 
        collapsible: true 
       }); 
      }); 
     </script> 
    </head> 
    <body> 
     <div id="accordion"> 
      <h1><a href="#1">Section 1</a></h1> 
      <div>In section 1</div> 

      <h1><a href="#2">Section 2</a></h1> 
      <div>In section 2</div> 
     </div> 
    </body> 
</html> 

Merci d'avance !.

Répondre

0
<html xmlns="http://www.w3.org/1999/xhtml"> 
<head runat="server"> 
    <title></title> 
    <link rel="stylesheet" href="//ajax.googleapis.com/ajax/libs/jqueryui/1.10.4/themes/smoothness/jquery-ui.css"/> 
    <script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script> 
    <script src="//ajax.googleapis.com/ajax/libs/jqueryui/1.10.4/jquery-ui.min.js"></script> 
    <script> 
      $(function() { 
       $("#accordion").accordion({ 
        collapsible: true 
       }); 
      }); 
    </script> 
</head> 
<body> 
    <div id="accordion"> 
     <h1><a href="#1">Section 1</a></h1> 
     <div>In section 1</div> 

     <h1><a href="#2">Section 2</a></h1> 
     <div>In section 2</div> 
    </div> 
</body> 
</html> 

Vous pouvez vérifier le code aussi ici: http://jsfiddle.net/aaa_borza/FDdLL/4/

+0

Merci pour la réponse. Enfin, l'erreur est sur la page de disposition. Il existe une référence css/js existante. – user3560764