component / classes Goto Github PK
View Code? Open in Web Editor NEWCross-browser element class manipulation
Cross-browser element class manipulation
can you push 1.0 to npm? thanks
more jquery-like
error Couldn't find package "[email protected]" required by "component-classes@^1.2.5" on the "npm" registry.
I don't know about other people's experience but I've got these annoying warnings...
Unable to resolve some modules:
"indexof" in /usr/share/meteor-app/node_modules/component-classes/index.js (web.browser)
If you notice problems related to these missing modules, consider running:
meteor npm install --save indexof
every time the Meteor tool rebuilds.
And the thing is, I don't even use this package. Instead the one package I use (rc-slider
) depends on another which depends on another which depends on another... which then depends on this one.
Maybe the solution is as simple as just add indexof
to my dependency list but that creates confusion later when I remove rc-slider
at some point and don't remember removing indexof
together.
#30 seems to be addressing this issue. I'm glad I'm not alone out there.
http://stackoverflow.com/questions/531508/getattribute-cannot-return-class-in-ie7
So,
ClassList.prototype.array = function(){
var className = this.el.getAttribute('class') || '';
shoude be updated to:
var className = this.el.className;
@jonathanong I wrote a quick script to handle this for you. Download the script from: https://gist.github.com/TooTallNate/8923821
Then, you can execute this file with a filename of npm users like so: https://gist.github.com/TooTallNate/cb7ba6cfc92ac685c533/raw/e037040256feead3439479b23af4cf407c3472fc/component-committers.txt
So the final invocation becomes something like:
$ cat component-committers.txt | xargs gnode sync.js
Can you run this so that we are all owners for the component-classes
package on npm? Cheers!
If your going to fallback to classList it would makes sense that your API matches the classList API.
classes(el).add('hi hello howdy')
Unless there is an objection, I want to pin the indexof dependency in package.json file. It does not change and using *
is beyond broken.
And/or npm owners add tootallnate classes-component
and I'll take care of it.
.toggle('multiline', lines > 1)
Not sure if component does something differently and drops the -component but using browserify only require("classes-component");
works.
jQuery has this functionality and it's really useful.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.