hassanbhb sends brownie points to @sjames1958gm :sparkles: :thumbsup: :sparkles:
:star2: 1764 | @sjames1958gm |http://www.freecodecamp.com/sjames1958gm
lukenetti3 sends brownie points to @lsgoulart :sparkles: :thumbsup: :sparkles:
:cookie: 55 | @lsgoulart |http://www.freecodecamp.com/lsgoulart
lukenetti3 sends brownie points to @lsgoulart :sparkles: :thumbsup: :sparkles:
:warning: lukenetti3 already gave lsgoulart points
var Person = function(firstAndLast) {
var nameArray = firstAndLast.split(" ");
var firstName = nameArray[0];
var lastName = nameArray[1];
return {
"getFirstName": function() {
return firstName;
},
"getLastName": function() {
return lastName;
},
"getFullName": function() {
return firstName + " " + lastName;
},
"setFirstName": function(first) {
firstName = first;
},
"setLastName": function(last) {
lastName = last;
},
"setFullName": function(firstAndLast) {
var array = firstAndLast.split(" ");
firstName = array[0];
lastName = array[1];
}
};
};
var bob = new Person('Bob Ross');
bob.getFullName();
All the tests pass except that > bob instanceof Person ....returns false. I've been reading the object documentation and don't understand why this does not return true. Does anyone here know what I'm doing wrong?I'm trying to align my header font and make the first and last text bigger, but can't seem to figure it out. Any help appreciated. Thanks!
<Header>
<div class="container-main">
<div class="main-image">
<img src= "images/main_header.jpg">
<h1>
<span class="design">design<br></span>
<span class="journey">is the journey of<br></span>
<span class="discovery">discovery</span>
</h1>
</div>
</div>
</Header>
span.design {
font-size: 200%;
}
span.journey{
font-size: 90%;
}
span.discovery{
font-size: 200%:
}
tj-johnson sends brownie points to @ndburrus :sparkles: :thumbsup: :sparkles:
:cookie: 916 | @ndburrus |http://www.freecodecamp.com/ndburrus
function getElementsByClassName(className) {
function findNode(node) {
if (node.classList.contains(className)) { //.classList becomes undefined eventually
return node.classList //return a list for sure
} else {
return findNode(node.childNodes[1])
}
}
return findNode(document.body.childNodes[1])
}
var result = getElementsByClassName("tweetHome");
var expectedNodeList = document.getElementsByClassName("tweetHome");
var expectedArray = Array.prototype.slice.apply(expectedNodeList);
var equality = _.isEqual(result, expectedArray);
if (_.isEqual(result, expectedArray)) {
console.log("You win");
} else {
console.log("You Lose")
}
@renx777 works really well mate. Could you help me with my scrollspy?
https://codepen.io/TheJamie/pen/PzjQjL?editors=1100
Not sure why its not working
dueldrawer8 sends brownie points to @sorinr :sparkles: :thumbsup: :sparkles:
:cookie: 442 | @sorinr |http://www.freecodecamp.com/sorinr
anye55 sends brownie points to @renx777 :sparkles: :thumbsup: :sparkles:
:cookie: 245 | @renx777 |http://www.freecodecamp.com/renx777
thejamiecrawford sends brownie points to @renx777 :sparkles: :thumbsup: :sparkles:
:cookie: 246 | @renx777 |http://www.freecodecamp.com/renx777
danydin sends brownie points to @sorinr :sparkles: :thumbsup: :sparkles:
:cookie: 443 | @sorinr |http://www.freecodecamp.com/sorinr
</div>
</center>
</div>
Hello guys, I started FCC few days ago and I'm now building the sample project of Front End Development section. I am trying to build the exact replica of this sample website: https://codepen.io/FreeCodeCamp/full/YqLyXB/
My question is, how can I make that page kind of section in the middle of webpage? I have changed the background but I am facing problem to develop the mid part(where the portfolio and the guy's picture is) I tried creating div and changing the background color but that does not work well Any suggestions?
danydin sends brownie points to @sorinr :sparkles: :thumbsup: :sparkles:
:cookie: 445 | @sorinr |http://www.freecodecamp.com/sorinr
@Sleepy-guy
$.ajax({
url: "http://en.wikipedia.org/w/api.php",
dataType: "jsonp",
data: {
'action': "opensearch",
'format': "json",
'search': searching
},
success: function(data) {
it should look something like this
danydin sends brownie points to @renx777 :sparkles: :thumbsup: :sparkles:
:cookie: 257 | @renx777 |http://www.freecodecamp.com/renx777
sleepy-guy sends brownie points to @kirbyedy :sparkles: :thumbsup: :sparkles:
:star2: 1208 | @kirbyedy |http://www.freecodecamp.com/kirbyedy
umerjamil16 sends brownie points to @danydin :sparkles: :thumbsup: :sparkles:
:cookie: 291 | @danydin |http://www.freecodecamp.com/danydin
FirstLine\SecondLine\ThirdLine
FirstLine\n\\SecondLine\\\rThirdLine
yusufercn sends brownie points to @kirbyedy :sparkles: :thumbsup: :sparkles:
:star2: 1211 | @kirbyedy |http://www.freecodecamp.com/kirbyedy
t-leonard sends brownie points to @michaelleehobbs and @freyarhianna :sparkles: :thumbsup: :sparkles:
:cookie: 283 | @freyarhianna |http://www.freecodecamp.com/freyarhianna
:cookie: 431 | @michaelleehobbs |http://www.freecodecamp.com/michaelleehobbs
var decodeEntities = (function() {
// this prevents any overhead from creating the object each time
var element = document.createElement('div');
function decodeHTMLEntities (str) {
if(str && typeof str === 'string') {
// strip script/html tags
str = str.replace(/<script[^>]*>([\S\s]*?)<\/script>/gmi, '');
str = str.replace(/<\/?\w(?:[^"'>]|"[^"]*"|'[^']*')*>/gmi, '');
element.innerHTML = str;
str = element.textContent;
element.textContent = '';
}
return str;
}
return decodeHTMLEntities;
})();
$("#text").innerHTML(a[0].content + "<p>— " + a[0].title + "</p>")
document.getElementById('text').innerHTML(a[0].content + "<p>— " + a[0].title + "</p>")
});
document.getElementById('text').a[0].content + "<p>— " + a[0].title + "</p>"
});
And they say
If you’re using something like jQuery, it can use the content with it’s own fancy callback magic, like this:
$.getJSON("http://quotesondesign.com/wp-json/posts?filter[orderby]=rand&filter[posts_per_page]=1&callback=", function(a) {
$("body").append(a[0].content + "<p>— " + a[0].title + "</p>")
});
$(document).ready(function()
nixonrichard sends brownie points to @freyarhianna and @krish2704 :sparkles: :thumbsup: :sparkles:
:cookie: 630 | @krish2704 |http://www.freecodecamp.com/krish2704
:cookie: 284 | @freyarhianna |http://www.freecodecamp.com/freyarhianna
<p className="text-center"
style={{
zIndex: "-1",
position: "absolute",
width: "40%",
top: "10%",
left: "30%",
}}>
No<br/>Cover<br/>Image<br/>Found
</p>
div.fill-screen
{
margin:0;
padding: 0;
height: 100vh;
width:100%;
background-color: black;
}
I want to make a full screen div, I could style the body but I want some effects on the div. Any reason why this is not doing it?
<style>
.bg-1 {
background-color: black; / Green /
color: black;
}
</style>
<link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/bootstrap/3.3.1/css/bootstrap.min.css"/>
<div class="container-fluid bg-1">
<h2 class="blue-text text-center" style="color:blue">A QUOTE MACHINE</h2>
<div class = "row text-center">
<div class = "col-xs-12 well message " id="text"><h3 class = "black-text">Hello</h3>
</div>
</div>
<div class = "row text-center">
<div class = "col-xs-12 ">
<button id = "getMessage" class = "btn btn-primary ">
Get Quotes
</button>
</div>
</div>
</div>
<span style="z-index:50;font-size:0.9em;"><img src="https://theysaidso.com/branding/theysaidso.png" height="20" width="20" alt="theysaidso.com"/><a href="https://theysaidso.com" title="Powered by quotes from theysaidso.com" style="color: #9fcc25; margin-left: 4px; vertical-align: middle;">theysaidso.com</a></span>
dhcodes sends brownie points to @lau-b :sparkles: :thumbsup: :sparkles:
:cookie: 283 | @lau-b |http://www.freecodecamp.com/lau-b
lau-b sends brownie points to @dhcodes and @nixonrichard and @krish2704 and @sorinr :sparkles: :thumbsup: :sparkles:
:cookie: 58 | @nixonrichard |http://www.freecodecamp.com/nixonrichard
:cookie: 632 | @krish2704 |http://www.freecodecamp.com/krish2704
:cookie: 446 | @sorinr |http://www.freecodecamp.com/sorinr
:star2: 1201 | @dhcodes |http://www.freecodecamp.com/dhcodes
startCountDown(time_arr,true);
$("a").attr("target","_blank")
$(document).ready()
?
$(document).ready
(document).ready(function(){
//$("body").html("hello WOrld!");
var btn_anim="animated hinge";
$(".social-icons").on('mouseenter',function(){
$(this).addClass(btn_anim);
});
$(".social-icons").on('mouseleave',function(){
$(this).removeClass(btn_anim);
});
});
''
$(document).ready(function(){
$("a").attr("target","_blank");
});
$.ajax({
url: "http://ip-api.com/json",
success: function(data) {
});
});
cjrutherford sends brownie points to @deadpool37 :sparkles: :thumbsup: :sparkles:
:cookie: 273 | @deadpool37 |http://www.freecodecamp.com/deadpool37
sprinting sends brownie points to @deadpool37 :sparkles: :thumbsup: :sparkles:
:cookie: 274 | @deadpool37 |http://www.freecodecamp.com/deadpool37
});
at the end?
data is undefined
$.ajax({
url: "http://ip-api.com/json",
success: function(data) {
}
});
cjrutherford sends brownie points to @1ucid and @deadpool37 :sparkles: :thumbsup: :sparkles:
:cookie: 120 | @1ucid |http://www.freecodecamp.com/1ucid
:warning: cjrutherford already gave deadpool37 points
dr.web
put ConEmuC.exe
into quarantine treating it a virus and launching failes. does anyone has this problem?
//jshint asi:true, esversion:6
function diff(arr1, arr2) {
return arr1.filter(n => !arr2.includes(n))
.concat(arr2.filter(n => !arr1.includes(n)))
}
//diff([1, 2, 3, 5], [1, 2, 3, 4, 5]);
diff(["diorite", "andesite", "grass", "dirt", "pink wool", "dead shrub"], ["diorite", "andesite", "grass", "dirt", "dead shrub"]);
.concat()
asi:true
//jshint asi:true, esversion:6
function diff(arr1, arr2) {
return arr1.filter(n => !arr2.includes(n))
.concat(arr2.filter(n => !arr1.includes(n)));
}
diff([1, 2, 3, 5], [1, 2, 3, 4, 5]);
0x0936 sends brownie points to @dagman :sparkles: :thumbsup: :sparkles:
:cookie: 602 | @dagman |http://www.freecodecamp.com/dagman
diff()
and since has been renamed to diffArray()
. I copied over my solution and made changes within the function, using the older diff()
name
function wordBlanks(myNoun, myAdjective, myVerb, myAdverb) {
var result = "";
// Your code below this line
result = "The" + myAdjective + myNoun + myVerb + myAdverb;
// Your code above this line
return result;
}
// Change the words here to test your function
wordBlanks("dog", "big", "ran", "quickly");
aaronhanna sends brownie points to @davisec52 :sparkles: :thumbsup: :sparkles:
:cookie: 450 | @davisec52 |http://www.freecodecamp.com/davisec52
cjrutherford sends brownie points to @harry97 :sparkles: :thumbsup: :sparkles:
:warning: could not find receiver for harry97
any interest in watching a FCC Twitch API Project stream?
this will take an estimated 1 - 2 hours. planning on stream start in about 25 minutes at https://www.twitch.tv/droopfizzle
<p data-height="265" data-theme-id="0" data-slug-hash="VjWNRz" data-default-tab="html,result" data-user="leykhins" data-embed-version="2" class="codepen">See the Pen <a href="https://codepen.io/leykhins/pen/VjWNRz/">VjWNRz</a> by Lekan (<a href="http://codepen.io/leykhins">@leykhins</a>) on <a href="http://codepen.io">CodePen</a>.</p>
<script async src="//assets.codepen.io/assets/embed/ei.js"></script>
doko85 sends brownie points to @pnahratow :sparkles: :thumbsup: :sparkles:
:cookie: 290 | @pnahratow |http://www.freecodecamp.com/pnahratow