Convert hover accordion to onclick

accordion, css, jquery, jquery-ui, onclick

Solution

$('h3','.horizontalaccordion ul li').on('click',function() {
    $(this).closest('li').toggleClass('hover').siblings().removeClass('hover');
});​

​FIDDLE

Problem

I have a accordion menu which is developed with pure css3. Currently it is opening the menu when hover on it but I want it to be opened on click. Ho do I achieve this? One more help. Currently content div is in the right side of the heading but I need that to be opened in the left side. And content div should have auto width based on the content. Here is the DEMO

Original source