Skip to content Skip to sidebar Skip to footer

Full Clickable Accordion In Bootstrap

I created a payment page for mobile in php with bootstrap. If visitor click the text the panel is expanding. But if visitor clicks nearby text the panel is not expanding. This is n

Solution 1:

You can manually toggle the accordion with $('#myAccordion').collapse('toggle')

Just set an event handler to watch for clicks on whatever area you want to be clickable, and then toggle the accordion.

For reference: http://getbootstrap.com/javascript/#collapse

Solution 2:

You will need to put the "href" attribute on the div element with class "panel-heading", also put there the "data-toggle" attribute. Like This:

<divclass="panel-heading invisible"data-toggle="collapse"href="#collapseOne"><h1class="panel-title">
            Title
        </h1></div><divid="collapseOne"class="panel-collapse collapse"><divclass="panel-body"></div></div>

Hope That Helps, dont forget to put the same ID to the "panel-collapse" element that holds the "panel-body". Good Luck :)

Post a Comment for "Full Clickable Accordion In Bootstrap"