Bootstrap Collapse problems in Hobo

20 views
Skip to first unread message

Kevin Brown

unread,
Apr 23, 2013, 3:04:29 PM4/23/13
to hobo...@googlegroups.com
I'm trying to use the Bootstrap Collapse plugin, and running into some problems that may be related to the combination of Hobo and bootstrap.

The behavior I'm seeing is that a simple Collapse test results in the collapse items only working properly the first time.   After that, they always stay expanded.   This behavior only happens when using it in Hobo.

It works fine outside of hobo -- the items are both collapsed to begin with, and if you click on either one, it expands and the other one always collapses properly if it was expanded, so only one is open at a time.  Here is a working non-Hobo sample on jsfiddle:   http://jsfiddle.net/brownknows/EJLM4/

However, if you put this same markup into a dryml file, the items never toggle and never collapse once they are expanded (actually they collapse briefly and then expand again).   Similar behavior has been reported by numerous folks on stackoverflow, etc., and after reading several of those, it seems the issue may be how the bootstrap js files are included.   Specifically, it seems that bootstrap.js collides with the code from bootstrap-collapse.js, and that causes the problems.   Here's are a few posts related to this behavior:

So... my general question is if this is a known issue when using hobo and boostrap, and if there is a suggested "best practice" for using bootstrap plugins in hobo without running into conflicts.
My specific question is has anybody got Bootstrap Collapse to work in Hobo, and if so, how did you get around this behavior?

Any thoughts or suggestions would be welcomed!

Thanks,
- Kevin

Bryan Larsen

unread,
Apr 23, 2013, 9:28:41 PM4/23/13
to Hobo Users
Are you adding the bootstrap-collapse file to your assets anywhere?   hobo-bootstrap by default includes all of bootstrap so you shouldn't need to add it again.

if you want more control, you can remove the //= require hobo_bootstrap from your assets and include exactly what you need.

Bryan



--
You received this message because you are subscribed to the Google Groups "Hobo Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to hobousers+...@googlegroups.com.
To post to this group, send email to hobo...@googlegroups.com.
Visit this group at http://groups.google.com/group/hobousers?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Kevin Brown

unread,
Apr 24, 2013, 12:22:14 AM4/24/13
to hobo...@googlegroups.com
Thanks Bryan,

I'm not explicitly adding bootstrap-collapse.   However, our front_site.dryml file has <include gem='hobo_bootstrap'/> and assets/javascript/front.js had //= require hobo_bootstrap, so I removed the latter and it works now!

- Kevin
Reply all
Reply to author
Forward
0 new messages