Reputation: 1895
Why isn't this fiddle working?
I can't find the misstake in t his code does someone have a solution for this?
Thanks!
jquery:
$(".flip-container").find(".front").addClass("frontflip");
.flip-container:hover .front {
transform: rotateY(0deg);
}
.flip-container:hover .back {
transform: rotateY(180deg);
}
Does rotate the divs but when i use
.frontflip {
transform: rotateY(0deg);
}
.backflip {
transform: rotateY(180deg);
}
with the right fiddle code above it doesnt?
Does someone have a idea?
Upvotes: 0
Views: 2116
Reputation: 2768
addClass
must have a capital 'C'
Edit:
In response to your rotation issue, it looks like it does work but your frontflip
class does a 0 degree rotation so nothing happens. If you change the addClass("frontflip")
to addClass("backflip")
then you'll see some changes.
See JSFiddle: http://jsfiddle.net/gupmgz0s/12/
Upvotes: 2
Reputation: 1895
.flip-container:hover .front {
transform: rotateY(0deg);
}
.flip-container:hover .back {
transform: rotateY(180deg);
}
Does rotate the divs but when i use
.frontflip {
transform: rotateY(0deg);
}
.backflip {
transform: rotateY(180deg);
}
with the right fiddle code above it doesnt?
Does someone have a idea?
Upvotes: 0
Reputation: 346
This fiddle is not working because you haven't included the Jquery in it.
and 'c' in addclass should be capital like 'addClass'
Upvotes: 1
Reputation: 82231
Two things:
1) You need to include jquery library.
2) You have incorrect syntax for addclass method. it should be:
$(".flip-container").find(".front").addClass("frontflip");
Upvotes: 2
Reputation: 8599
This is not working because you are not referencing jquery in Frameworks & Extensions section
Upvotes: 1
Reputation: 12305
You fiddle doesn't have Jquery
included, now it's working:
$(".flip-container").find(".front").addClass("frontflip");
Upvotes: 1