get help in general - we have more specialized help rooms here: https://gitter.im/FreeCodeCamp/home
thecodingaviator on master
remove A (#31157) (compare)
function sumFibs(num) {
return num;
}
sumFibs(4);
Return the sum of all odd Fibonacci numbers up to and including the passed number if it is a Fibonacci number.
more info:
bf details
|bf links
|hint
I have a jQuery question. I am currently doing a static todo app, and for dynamically generated checkboxes, the .change()
event does not work, as opposed to a pre-existing checkbox (one that was part of the original DOM) where it would work. Why is that?
What I am trying to do is, if the user changes/clicks on the checkbox, a class would be toggled on its sibling <label>
. It doesn’t work for injected checkboxes. How can I go about fixing this?
function yourTurn() {
var currentPosition = 0;
var pressTracker = 0;
$('.gameButton').mousedown(function() {
yourNum = parseInt(this.id)
lightPressed(yourNum);
yourSeq[currentPosition] = yourNum;
})
$('.gameButton').mouseup(function() {
checkLight(currentPosition);
currentPosition++;
console.log(currentPosition, yourSeq.length);
})
if (currentPosition == 1) {
console.log("done");
return;
}
}
:star: 379 | @moigithub | http://www.freecodecamp.com/moigithub
hi, what does it means this :
"Give your form's text input field a class of form-control. "
and how i can fix it on the right way?
Here's my code:
<form action="/submit-cat-photo">
<div class="row">
<div class="col-xs-6">
<label><input type="radio" name="indoor-outdoor"> Indoor</label>
</div>
<div class="col-xs-6">
<label><input type="radio" name="indoor-outdoor"> Outdoor</label>
</div>
</div>
<div class="row">
<div class="col-xs-4">
<label><input type="checkbox" name="personality"> Loving</label>
</div>
<div class="col-xs-4">
<label><input type="checkbox" name="personality"> Lazy</label>
</div>
<div class="col-xs-4">
<label><input type="checkbox" name="personality"> Crazy</label>
</div>
</div>
<input type="text" placeholder="cat photo URL" required>
<button class="btn btn-primary" type="submit"><i class="fa fa-paper-plane"></i>Submit</button>
</form>
@francescoeri just give your text input field i.e. <input type="text" placeholder="cat photo URL" required> a class of "form-control." So it will be
<input class="form-control" type="text" placeholder="cat photo URL" required>
"form-control" is class from Bootstrap for input text fields.
Okay. I'm just starting out, and I can't get h2 to have the font-family Lobster. Here's my code:
<style>
.red-text {
color: red;
}
<link href="http://fonts.googleapis.com/css?family=Lobster" rel="stylesheet" type="text/css">
h2 {
font-family: Lobster;
}
Can someone tell me what I'm doing wrong?
:star: 1080 | @saintpeter | http://www.freecodecamp.com/saintpeter
this.
before its name it is public. Without this.
before its name it is private. There should be no other changes to the code other than removing/adding this.
in these two positions. Do you understand?
:star: 471 | @catapixel | http://www.freecodecamp.com/catapixel