uxxman / angular-accordion

A simple angular directive for adding accordion UI element
MIT License
54 stars 37 forks source link

Does not work in certain condition on mobile #30

Closed Rich-Hopkins closed 6 years ago

Rich-Hopkins commented 7 years ago

Hello, and thank you for this code. I greatly appreciate it. I'm teaching myself AngularJS and am using it to rebuild a website, and found your library to duplicate what I was doing with jQuery-UI on the old website. I have found a problem, though, and since I'm a noob, I'm not sure how to fix it.

I have the site up at a temporary location right now. I have one page (fpcdev.azurewebsites.net/about) that did have two separate accordions, but when viewed on mobile, the top accordion did not function. I changed it all to be in one accordion, but with that, none of it works on mobile. I can duplicate this in a desktop browser by making the browser narrow. It seems to be at the point where the bootstrap class changes from "col-md-8 col-md-offset-2" to "col-xs-12" where the problem occurs. If I remove the col-xs-12 from the class of the div, the accordion works properly.

Do you have any suggestions for me? I greatly appreciate it.

Rich-Hopkins commented 7 years ago

A little more trial-and-error and I have it working on my phone. I removed the col-xs-12 and replaced it with col-sm-12, and it works. Apparently something is conflicting in the col-xs-12 class. Again, thank you for sharing your code.

Rich-Hopkins commented 7 years ago

I ended up switching to the Angular ui-Bootstrap Accordion.