soundasleep / jquery-dropdown

Bootstrap-style dropdowns with some added features and no dependencies.
Other
767 stars 268 forks source link

Not use same classes as Bootstrap #65

Closed fredericpetit-gh closed 9 years ago

fredericpetit-gh commented 9 years ago

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...

claviska commented 9 years ago

It's not intended to work with Bootstrap. It's an alternative :)

leemg commented 9 years ago

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 :-)

bartvanderwal commented 9 years ago

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.)

jqdropdown-issue

claviska commented 9 years ago

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 :)

bartvanderwal commented 9 years ago

:+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? :)

claviska commented 9 years ago

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.

bartvanderwal commented 9 years ago

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?

claviska commented 9 years ago

I held off because the documentation in index.html isn't updated and I haven't had a chance to test things out.

bartvanderwal commented 9 years ago

Okay! Thanks for the quick response. I guess you also have real work besides 'da open source' :).