I am getting issue on accordion click event in bootstrap

I have created one page in that there is on button like MORE.if i click on MORE next page will display.In next page there are 5 accordion tab created..the issue is that accordion tab click event is not working.Please help me..

<html>
    <head>
        <meta charset="utf-8">
        <title>DUMMY</title>
        <meta name="description" content="">
        <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1">
        <meta name="format-detection" content="telephone=no">
        <link href="favicon.ico" rel="shortcut icon" type="image/x-icon">
        <link rel="stylesheet" href="css/style.css">
        <link rel="stylesheet" href="css/responsive.css">
        <link rel="stylesheet" href="css/themes.css">
        <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css">
        <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap-theme.min.css">
        <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
        <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/js/bootstrap.min.js"></script>

            <style>
          .accordion-toggle{
        display:inline-block;
            width:100%;
        }
            </style>


        </head>
        <body class="blue-skin">

         <div class="wrapper">

            <!-- SECTION -->
            <section id="home">
                <div class="wrap inverse bg-dark vpadding-strong anima">


                </div>
            </section>

            <section id="advs">
                <div class="wrap">
                    <header class="content-header"></header>

                    <article id="fumeExhaustSystem" class="container_12 content center">
                        <div class="grid_1"></div>
                        <div class="grid_10">
                            <div class="grid_6">
                                    "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum."
                                    <a href="#" data-popup="work-popup-2" class="button"><span>More</span></a>
                                </div>

                        </div>
                        <div class="grid_1"></div>
                    </article>



                    <footer class="content-footer"></footer>
                </div>
            </section>



        </div> <!-- /wrapper -->



        <div class="overlay"></div> <!-- overlay layer -->

        <!-- POPUP: portfolio -->

            <div id="work-popup-2" class="popup work-popup">
                <a href="#" class="pclose"></a>
                <div class="slides-container fullslider">
                    <ul class="sliderwrap">
                        <li><div class="bgimg"><img src="images/slides/slide-3.jpg" alt=""></div></li>
                        <li><div class="bgimg"><img src="images/slides/slide-4.jpg" alt=""></div></li>
                        <li><div class="bgimg"><img src="images/slides/slide-5.jpg" alt=""></div></li>
                        <li><div class="bgimg"><img src="images/slides/slide-6.jpg" alt=""></div></li>
                        <li><div class="bgimg"><img src="images/slides/slide-9.jpg" alt=""></div></li>
                    </ul>
                    <a href="#" class="slide-prev slide-arrow"></a>
                    <a href="#" class="slide-next slide-arrow"></a>
                </div>
                <div class="container_12 vpadding">
                    <div class="grid_3">
                        <h2> System</h2>
                    </div>
                    <div class="grid_9">
                        "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum."


        <div class="panel-group" id="accordion">
          <div class="panel panel-default">
            <div class="panel-heading">
              <h4 class="panel-title">
                <a class="accordion-toggle" data-toggle="collapse" data-parent="#accordion" href="#collapseOne">
                  1. 
                </a><i class="indicator glyphicon glyphicon-chevron-down  pull-right"></i>
              </h4>
            </div>
            <div id="collapseOne" class="panel-collapse collapse in">
              <div class="panel-body">
                <p>"Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum."</p>
              </div>
            </div>
          </div>

          <div class="panel panel-default">
            <div class="panel-heading">
              <h4 class="panel-title">
                <a class="accordion-toggle" data-toggle="collapse" data-parent="#accordion" href="#collapseTwo">
                   2. 
                </a><i class="indicator glyphicon glyphicon-chevron-up  pull-right"></i>
              </h4>
            </div>
            <div id="collapseTwo" class="panel-collapse collapse">
              <div class="panel-body">
                "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum."
              </div>
            </div>
          </div>

         <div class="panel panel-default">
            <div class="panel-heading">
              <h4 class="panel-title">
                <a class="accordion-toggle" data-toggle="collapse" data-parent="#accordion" href="#collapseThree">
                   3. 
                </a><i class="indicator glyphicon glyphicon-chevron-up  pull-right"></i>
              </h4>
            </div>
            <div id="collapseThree" class="panel-collapse collapse">
              <div class="panel-body">
               "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum."
              </div>
            </div>
          </div> <div class="panel panel-default">
            <div class="panel-heading">
              <h4 class="panel-title">
                <a class="accordion-toggle" data-toggle="collapse" data-parent="#accordion" href="#collapsefour">
                   4. 
                </a><i class="indicator glyphicon glyphicon-chevron-up  pull-right"></i>
              </h4>
            </div>
            <div id="collapsefour" class="panel-collapse collapse">

              <div class="panel-body">
                <p>"Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum."</p>
              </div>
            </div>
          </div>

          <div class="panel panel-default">
            <div class="panel-heading">
              <h4 class="panel-title">
                <a class="accordion-toggle" data-toggle="collapse" data-parent="#accordion" href="#collapsefive">
                  5. 
                </a><i class="indicator glyphicon glyphicon-chevron-up pull-right"></i>
              </h4>
            </div>
            <div id="collapsefive" class="panel-collapse collapse">
              <div class="panel-body">
                <p>"Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum."</p>
              </div>
            </div>
          </div>

        </div>


        <script>
        function toggleChevron(e) {
            $(e.target)
                .prev('.panel-heading')
                .find("i.indicator")
                .toggleClass('glyphicon-chevron-down glyphicon-chevron-up');
        }
        $('#accordion').on('hidden.bs.collapse', toggleChevron);
        $('#accordion').on('shown.bs.collapse', toggleChevron);
        </script>



        <script src="js/jquery-2.1.0.min.js"></script>
        <script src="js/jquery.plugins.js"></script>
        <script src="js/custom.js"></script>


        </body>
        </html>

Answers


What you are doing here is that you are collapsing div on click of anchor tag.

<a class="accordion-toggle" data-toggle="collapse" data-parent="#accordion" href="#collapseOne">

and it's working fine, but maybe you want it to be opened on click of whole slide, you can do it with CSS workaround by making anchor spread on whole clickable panel.

see the attached fiddle for more info

Updated Fiddle : http://jsfiddle.net/RockRathore/f6au4bn9/3/


Need Your Help

Multiple types were found that match the controller named 'Home'

c# asp.net-mvc-3 controller

I currently have two unrelated MVC3 projects hosted online.