Closed fredericpetit-gh closed 9 years ago
It's not intended to work with Bootstrap. It's an alternative :)
I have same issue, would be good to use along with Bootstrap, as this is more suited to my requirements, but has issues with Bootstrap interfering with CSS classes. Cheers :-)
Nice idea!
But I fully agree with @batphil and @leemg. Bootstrap as of now (v3.3.1) has NO support for putting other things in dropdowns besides menu's. E.g. there is no dropdown panel
. For me the dropdown-panel
class is the distinguishing feature of this library.
@claviska:As this library doesn't do ANY of the whole range of other things that bootstrap does do except the pulldown menu's, to me it it doesn't make sense to say that this is an alternative to Bootstrap. It's like writing a QuerySelectorAll() shim and then saying it's an alternative to jQuery.
I'm looking at changing the dropdown
, dropdown-menu
classes to jq-dropdown
, jq-dropdown-menu
, etc. in both the .css and the JavaScript. However it's cumbersome. And I can imagine I'll bump into issue. It would be really nice if this would work out of the box.
(And ofcourse, it would be even nicer if bootstrap would just add a dropdown-panel
feature. But probably there's some technical issue why they haven't.)
Thanks for your feedback and for pointing out why folks would want to use this along with Bootstrap. Clearly there's demand for this to be used alongside Bootstrap, so I guess that's the next step. The jq-dropdown
prefix would be fine, so let's go with that.
If anyone wants to tackle this for me before I can get to it, feel free. All I ask is that you update the docs too :)
:+1:
Well I could send you a pull request from my fork, I added a section to the readme.md also. But there are no unit tests, and I don't know if all other things still work (e.g. regression test). I also want to implement the 'no side effects' issue (68), so thay nothing happens when you add the class, unless library user does his own JS call.
But I can't immediately figure out how to do that; how does the $(document).on('click.jq-dropdown', '[data-jq-dropdown]', show);
work? :)
We can solve this issue by simply changing everything from dropdown
to jq-dropdown
, including all data attributes and class names.
That should also solve #68 since there is already an API for attaching/detaching/etc.
I submitted a pull request about a week ago. I updated the classes in my fork of this project: https://github.com/bartvanderwal/jquery-dropdown
It seems to now work better along with Bootstrap. @claviska can you pull?
I held off because the documentation in index.html
isn't updated and I haven't had a chance to test things out.
Okay! Thanks for the quick response. I guess you also have real work besides 'da open source' :).
Can you use others names for dropdown classes ? It's doesn't work with bootstrap (without changes) , manual change is required. So, it's more user friendly if your code works out of the box...