A simple Javascript class helper function. You can check whether an element has a class, or add/remove/toggle a class.
Questions tagged [classiejs]
13 questions
6
votes
3 answers
"Cannot read property 'classList' of null" when using classList.add
I am having this error, but since I am not familiar with the code. It came from a theme in startbootstrap (Creative). The file is
classie.js
code:
/*!
* classie - class helper functions
* from bonzo https://github.com/ded/bonzo
*
*…

bpunzalan
- 378
- 1
- 6
- 24
2
votes
0 answers
Best way to bind button click to an Array Prototype .slice in a separate div?
Cheers, first post..lurked and learned for a few years now...
I've encountered a bit of an issue when attempting to bind a button click to another function- mainly because the function seems to be an Array.prototype.
My JS Fiddle example.
I put…

MrMeeSeeks
- 21
- 2
2
votes
2 answers
Why does this cause "Mismatched anonymous define()" in requireJS?
I'm using a module called classie.js, whose codes can be viewed below:
/*!
* classie - class helper functions
* from bonzo https://github.com/ded/bonzo
*
* classie.has( elem, 'my-class' ) -> true/false
* classie.add( elem, 'my-new-class' )
*…

Hanfei Sun
- 45,281
- 39
- 129
- 237
1
vote
2 answers
Why navigation menu is clickable only one time?
I am trying to build a full screen navigation menu using one tutorial but at the end of it I can not understand why my navigation menu is clickable only once. So you click on it one time and the menu is showing then you are able to close it but if I…

thedivkiller
- 81
- 1
- 7
1
vote
0 answers
Page Loader - Combining Functions
I have a page loading script that swpas between two dives (giving the illusion of moving from a loading screen to a homepage). The functions uses the classie library to do some off the cuff swap outs of classes via a trigger (in this case a…

Yanayaya
- 2,044
- 5
- 30
- 67
1
vote
1 answer
Toggling a second menu with ClassieJS or jQuery?
Currently the code is set up to toggle the same menu for every icon.
Here is a fiddle of my current progress http://jsfiddle.net/2Lyttauv/
What I want to achieve is adding a unique menu for each individual icon.
I started by creating the following…
0
votes
1 answer
Links of nav bar don't go to the area id
After applying styles of Codrops in nav bar, I cannot make links go to the area id in a single page.
If I press "Clients" (for example), the link does not go to the id Clients area.
I need help in identifying the source of the problem.
Here is my…

Carlos Gómez
- 453
- 7
- 16
0
votes
0 answers
Classie undefined, how to bring anonymous objects in scope with dojo AMD
I have this code:
/*!
* classie - class helper functions
* from bonzo https://github.com/ded/bonzo
*
* classie.has( elem, 'my-class' ) -> true/false
* classie.add( elem, 'my-new-class' )
* classie.remove( elem, 'my-unwanted-class' )
*…

Adrian Caragea
- 119
- 9
0
votes
1 answer
Change css background color in my function
I have this code to change my buttons inner HTML when they are clicked. I also want to change the CSS background color when button is clicked, but I couldn't get it to work.
var menuTop =…

Abdel hakeem
- 21
- 4
0
votes
1 answer
Toggling Between a CSS class with pure javascript on 'n' elements
Working on creating functionality where when the user clicks on one of the products (each of the elements have the same assigned ID card-reveal) it adds a CSS class to the container specifically clicked (active state) to show information for that…

Amechi
- 742
- 3
- 11
- 32
0
votes
1 answer
JS Function "not defined"
I'm fairly new to JS, and I have been looking around to find answers unsuccessfully. It may well be trivial but I must not be looking at the problem from the right angle.
I have a JS function using classie and scroll event working well (toggling…

LudoC
- 919
- 1
- 8
- 16
0
votes
2 answers
having trouble understanding classie.js API
Hello all I'm working through an example of a slide and push menu on another site and am struggling to understand an if statement in the classie.js file that is included with the source download.
if ( 'classList' in document.documentElement ) {
…

Jordan Camp
- 842
- 4
- 9
- 20
-1
votes
1 answer
How to bind a javascript function to dynamically added Element on DOM?
I am trying to use some use-full JavaScript code I found in codrop for creating custom select box, but i'm failing to bind this javascript function
(function() {
[].slice.call( document.querySelectorAll( 'select.cs-select' ) ).forEach(…

Äñäñd Ayan
- 79
- 5
- 10