kupriyanenko / jbone

JavaScript Library for Events and DOM manipulation. Replaces jQuery for Backbone (2.5kb gzipped)
http://jbone.js.org
MIT License
279 stars 35 forks source link

Support Bootstrap JS components #1

Closed mvasilkov closed 7 years ago

mvasilkov commented 11 years ago

Good time of day.

Is there (or will there be) support for Bootstrap JS components, by any chance? That would be great, since Backbone+Bootstrap is a popular front-end combination used by many developers.

(Word of apology: I haven't tried it.)

kupriyanenko commented 11 years ago

Good idea, need time to investigate this area.

Ramzess-2 commented 11 years ago

JBone has Ajax?

kupriyanenko commented 11 years ago

Ramzess-2, jBone have no AJAX, but you can connect your own library, for example http://microjs.com/#ajax

Ramzess-2 commented 11 years ago

Спасибо, это как раз то, что нужно! :)

dmythro commented 11 years ago

Hi. I've checked quickly the issue because need Bootstrap in some projects. Maybe missed smth, but list is probably big enough to just use jQuery:

In many cases usage of methods above may be decreased, so try to contribute. Plus, some of them used only in 1 of components - maybe you don't need them. Some are simple aliases to existing things.

But features like .data() and .extend() are quite important as well to live in the library, I'd say.

P.S. Compared usage inside the full Bootstrap 3 with README methods list. And thanks for sharing this, looks promising for some projects.

kupriyanenko commented 11 years ago

Hi, thanks @z-ax.

I create new branch for bootstrap support.

Now this branch includes next methods:

Now all transition, alert, button and part of carousel tests passed.

This is not so much, but I think this is good for start.

dmythro commented 11 years ago

Cool, don't you wanna include .extend() and .data() into all versions? They're important to work with both vars and DOM and small pieces of code. At least, they may be in separate src files for custom builds.

kupriyanenko commented 11 years ago

@z-ax yes, solved in this commit https://github.com/kupriyanenko/jbone/commit/4d7dd87b624e1c94ba3f629dcec080a833e05d68, and support for custom builds is planned.

Ramzess-2 commented 10 years ago

Look, can i select html object by attribute?

kupriyanenko commented 10 years ago

@Ramzess-2 yes, jBone have full support of Document.querySelectorAll, example: http://jsfiddle.net/4RL8b/

ps: and for new questions you can open new issues, this issue about bootstrap support.

devel-pa commented 9 years ago

To support Bootstrap jBone have to support delegate events.

This is the incriminated line in dispatch:

(el !== e.target && el.contains(e.target))

If you delegate the events to document, like bootstrap does, there are 3 things that can happen:

  1. Clicking on document: el is document, e.target is document.documentElement and the condition is true. Not mentioning when the element searched is not in DOM it crashes later.
  2. Clicking the element: el is document, e.target is the right element and condition is true
  3. Clicking other element: el is document, e.target is whatever element and condition is true
vitaly87 commented 9 years ago

Hi, I want to be updated, dose the jbone have bootstrap support?