nachlawi sends brownie points to @coymeetsworld :sparkles: :thumbsup: :sparkles:
:star2: 1089 | @coymeetsworld |http://www.freecodecamp.com/coymeetsworld
coder7215 sends brownie points to @nachlawi :sparkles: :thumbsup: :sparkles:
:cookie: 280 | @nachlawi |http://www.freecodecamp.com/nachlawi
konikodes sends brownie points to @coymeetsworld :sparkles: :thumbsup: :sparkles:
:star2: 1090 | @coymeetsworld |http://www.freecodecamp.com/coymeetsworld
"response": {
"version": "0.1",
"termsofService": "http://www.wunderground.com/weather/api/d/terms.html",
"features": {
"conditions": 1
}
function convertHTML(str) {
str=str.split("");
for(i=0;i<str.length;i++)
{switch(str) {
case "&" :
str[i]= "&";
break;
case "<":
str[i]= "<";
break;
case ">":
str[i]= ">";
break;
}
}
// :)
return str;
}
convertHTML("Dolce & Gabbana");
ANy idea why this switch doesnt work with &123xylem sends brownie points to @gregatgit and @coymeetsworld :sparkles: :thumbsup: :sparkles:
:cookie: 569 | @gregatgit |http://www.freecodecamp.com/gregatgit
:star2: 1091 | @coymeetsworld |http://www.freecodecamp.com/coymeetsworld
http://
for your codePen
```js ⇦ Type 3 backticks and then press [shift + enter ⏎]
(type js or html or css)
<paste your code here>,
then press [shift + enter ⏎]
``` ⇦ Type 3 backticks, then press [enter ⏎]
This an inline `<paste code here>
` code formatting with a single backtick() at _start_ and _end_ around the
code`.
See also: ☛ How to type Backticks | ☯ Compose Mode | ❄ Gitter Formatting Basics
truncateString("Absolutely Longer", 2) should return "Ab...".
function truncateString(str, num) {
// Clear out that junk in your trunk
if (str.length>num && str.length>3){
str = str.slice(0, num-3) + "...";
} else if (num <= 3) {
str = str.slice(0, num) + "...";
//} else if (num <= 3 && num === 2) {
//str = str.slice(0, 2) + "...";
}
return str;
}
truncateString("A-tisket a-tasket A green and yellow basket", 11);
coder7215 sends brownie points to @alexdecapri :sparkles: :thumbsup: :sparkles:
:cookie: 276 | @alexdecapri |http://www.freecodecamp.com/alexdecapri
row
div after the first column? Or had an extra </div>
tag there on or about line 13
nsieber sends brownie points to @khaduch :sparkles: :thumbsup: :sparkles:
:star2: 1281 | @khaduch |http://www.freecodecamp.com/khaduch
newtonxu sends brownie points to @james-h33 :sparkles: :thumbsup: :sparkles:
:cookie: 40 | @james-h33 |http://www.freecodecamp.com/james-h33
https://codepen.io/Atalaa/pen/ezpgzM?editors=1000
I want to make my "Facts" button be like a Collapsible button that show a big text, but when i click on it nothing happen
atalaa sends brownie points to @mutantspore :sparkles: :thumbsup: :sparkles:
:star2: 1719 | @mutantspore |http://www.freecodecamp.com/mutantspore
atalaa sends brownie points to @mutantspore :sparkles: :thumbsup: :sparkles:
:warning: atalaa already gave mutantspore points
</Resume>
needsmorecoffee sends brownie points to @mutantspore :sparkles: :thumbsup: :sparkles:
:star2: 1720 | @mutantspore |http://www.freecodecamp.com/mutantspore
rouque sends brownie points to @khaduch :sparkles: :thumbsup: :sparkles:
:star2: 1282 | @khaduch |http://www.freecodecamp.com/khaduch
color
not font-color
$('li:hover').css({'color':'red'});
jackleb130111 sends brownie points to @n-upchurch and @mutantspore :sparkles: :thumbsup: :sparkles:
:cookie: 232 | @n-upchurch |http://www.freecodecamp.com/n-upchurch
:star2: 1721 | @mutantspore |http://www.freecodecamp.com/mutantspore
{}
syntax if you want to do more than one at time
n-upchurch sends brownie points to @mutantspore :sparkles: :thumbsup: :sparkles:
:star2: 1722 | @mutantspore |http://www.freecodecamp.com/mutantspore
quocanh261997 sends brownie points to @shusil123 :sparkles: :thumbsup: :sparkles:
:cookie: 360 | @shusil123 |http://www.freecodecamp.com/shusil123
target=“_blank”
atalaa sends brownie points to @sorinr and @mutantspore :sparkles: :thumbsup: :sparkles:
:cookie: 335 | @sorinr |http://www.freecodecamp.com/sorinr
:star2: 1723 | @mutantspore |http://www.freecodecamp.com/mutantspore
rouque sends brownie points to @sorinr :sparkles: :thumbsup: :sparkles:
:cookie: 336 | @sorinr |http://www.freecodecamp.com/sorinr
if (num > 30) {
imtylerland sends brownie points to @coymeetsworld :sparkles: :thumbsup: :sparkles:
:star2: 1096 | @coymeetsworld |http://www.freecodecamp.com/coymeetsworld
$("#getMessage").on("click", getRandomQuote);
vinay-jaju sends brownie points to @mutantspore :sparkles: :thumbsup: :sparkles:
:star2: 1724 | @mutantspore |http://www.freecodecamp.com/mutantspore
https://twitter.com/intent/tweet?text=
add on the quote to that and put the lot into the URL in your button using the Jquery .attr
method
rabibsust sends brownie points to @sorinr :sparkles: :thumbsup: :sparkles:
:cookie: 337 | @sorinr |http://www.freecodecamp.com/sorinr
jsonp
if you're using an AJAX call. Changing the datetype requested worked for me.
sorinr sends brownie points to @purnendutiwari :sparkles: :thumbsup: :sparkles:
:cookie: 122 | @purnendutiwari |http://www.freecodecamp.com/purnendutiwari
@Ketchypie try this
<body>
<div class="container-fluid">
<div class="jumbotron">
<div>
<div >
<h1 class="text-center">Mark Lawrence</h1>
<h2 class="text-center">NOVELIST & RESEARCH SCIENTIST</h2>
</div>
</div>
<div id="background-white">
<img id="mark-lawrence" class="center-block img-responsive " src="http://www.experimento42.com.br/experimento42/wp-content/uploads/2015/04/mark-lawrence-experimento42.jpg">
<h4 class="text-center text-muted">Mark Lawrence chilling<h4>
</div>
</div>
</div>
</body>
ketchypie sends brownie points to @purnendutiwari :sparkles: :thumbsup: :sparkles:
:cookie: 123 | @purnendutiwari |http://www.freecodecamp.com/purnendutiwari
@media screen and (max-width: 720px) {
.b-main-menu__item {
line-height: 100px;
}
}
chrissyalbert sends brownie points to @jdtdesigns :sparkles: :thumbsup: :sparkles:
:cookie: 448 | @jdtdesigns |http://www.freecodecamp.com/jdtdesigns
@chrissyalbert when you have this on the a-tag attribute target="_blank"
it will open a new window/tab
<a href="#" target="_blank"></a> //<-------from that it will open a new tab/window when ever the link/button with link is click
this one will require you to access the href attribute of the a-tag in js by concatenating
you can also do this by this method
https://developer.mozilla.org/en-US/docs/Web/API/Window/open
$.ajax({
url: "https://andruxnet-random-famous-quotes.p.mashape.com/cat=famous",
type: "GET",
datatype: "JSON",
success: function(data) {
$("#text").html(data.quote);
$("#author").text(data);
console.log(data);
},
here is the code and the data comes back like {"quote":"blahblah","author":"blahblah"} but data.quote or data.author are undefined. data[0] or data[1] are just the first 2 characters of the data
chrissyalbert sends brownie points to @wearenotgroot :sparkles: :thumbsup: :sparkles:
:star2: 1110 | @wearenotgroot |http://www.freecodecamp.com/wearenotgroot
alecglas sends brownie points to @wearenotgroot :sparkles: :thumbsup: :sparkles:
:star2: 1111 | @wearenotgroot |http://www.freecodecamp.com/wearenotgroot
natixdev sends brownie points to @dhcodes :sparkles: :thumbsup: :sparkles:
:cookie: 978 | @dhcodes |http://www.freecodecamp.com/dhcodes
natixdev sends brownie points to @dhcodes :sparkles: :thumbsup: :sparkles:
:warning: natixdev already gave dhcodes points
:cookie: 979 | @dhcodes |http://www.freecodecamp.com/dhcodes
cameron-burkholder sends brownie points to @dhcodes :sparkles: :thumbsup: :sparkles:
cameron-burkholder sends brownie points to @devopsec and @dhcodes :sparkles: :thumbsup: :sparkles:
:warning: cameron-burkholder already gave dhcodes points
:cookie: 284 | @devopsec |http://www.freecodecamp.com/devopsec
.parent().removeClass("active")
.end().filter("[href=#"+id+"]").parent().addClass("active");
$('a').click(function () {
if ($(':animated').length) {
return false;
}
});
@Grizvok check out these below:
$("#btn-phone").click(function(e) {
e.preventDefault();
});
/ non-stick buttons :) /
$(".btn-default").mouseup(function(){
$(this).blur();
})
you could use the first with a trigger then re-enable (kind of round-about way) or use the second I created non-sticky buttons
if $(".quote-content").is(":animated") {
return false
}
if ($quotecontent.is(":animated")) {
return false;
}
natixdev sends brownie points to @dhcodes :sparkles: :thumbsup: :sparkles:
:warning: natixdev already gave dhcodes points
cyb3rsalih sends brownie points to @korn3l and @belax8 :sparkles: :thumbsup: :sparkles:
:cookie: 266 | @korn3l |http://www.freecodecamp.com/korn3l
:cookie: 396 | @belax8 |http://www.freecodecamp.com/belax8
devopsec sends brownie points to @doomflake and @jdtdesigns :sparkles: :thumbsup: :sparkles:
:cookie: 449 | @jdtdesigns |http://www.freecodecamp.com/jdtdesigns
:cookie: 132 | @doomflake |http://www.freecodecamp.com/doomflake
cameron-burkholder sends brownie points to @jonsnow08 :sparkles: :thumbsup: :sparkles:
:cookie: 276 | @jonsnow08 |http://www.freecodecamp.com/jonsnow08
$("document").ready(main);
var long;
var latt;
function main() {
//This gets the users location and stores it in already defined globals
if (navigator.geolocation) {
navigator.geolocation.getCurrentPosition(function(position) {
long = position.coords.longitude;
latt = position.coords.latitude;
});
}
}
<p data-height="265" data-theme-id="0" data-slug-hash="beVJXO" data-default-tab="html,result" data-user="miciah1" data-embed-version="2" class="codepen">See the Pen <a href="http://codepen.io/miciah1/pen/beVJXO/">beVJXO</a> by Micah (<a href="http://codepen.io/miciah1">@miciah1</a>) on <a href="http://codepen.io">CodePen</a>.</p>
<script async src="//assets.codepen.io/assets/embed/ei.js"></script>
devopsec sends brownie points to @dhcodes and @jdtdesigns :sparkles: :thumbsup: :sparkles:
:cookie: 980 | @dhcodes |http://www.freecodecamp.com/dhcodes
:warning: devopsec already gave jdtdesigns points
miciah123 sends brownie points to @kirbyedy :sparkles: :thumbsup: :sparkles:
:star2: 1084 | @kirbyedy |http://www.freecodecamp.com/kirbyedy
miciah123 sends brownie points to @jdtdesigns :sparkles: :thumbsup: :sparkles:
:cookie: 450 | @jdtdesigns |http://www.freecodecamp.com/jdtdesigns
miciah123 sends brownie points to @sorinr :sparkles: :thumbsup: :sparkles:
:cookie: 339 | @sorinr |http://www.freecodecamp.com/sorinr
:cookie: 451 | @jdtdesigns |http://www.freecodecamp.com/jdtdesigns
andi-lo sends brownie points to @jdtdesigns :sparkles: :thumbsup: :sparkles:
sorinr sends brownie points to @dhcodes :sparkles: :thumbsup: :sparkles:
:cookie: 981 | @dhcodes |http://www.freecodecamp.com/dhcodes
I'm trying to set background image for page.
With t his code
body {
background-image: url ("http://subtlepatterns2015.subtlepatterns.netdna-cdn.com/patterns/tweed.png") ;
}
gxrobb sends brownie points to @heyjp :sparkles: :thumbsup: :sparkles:
:cookie: 392 | @heyjp |http://www.freecodecamp.com/heyjp
:bulb: to format code use backticks! ``` more info
$("document").ready(function() {
$(".img").click(function() {
$(".caption").show();
});
});
konikodes sends brownie points to @sorinr :sparkles: :thumbsup: :sparkles:
:cookie: 341 | @sorinr |http://www.freecodecamp.com/sorinr
konikodes sends brownie points to @tadake :sparkles: :thumbsup: :sparkles:
:cookie: 389 | @tadake |http://www.freecodecamp.com/tadake
@gxrobb - a couple other tips for your pomodoro clock project:
<div>
values) to store data, and have to read it from the DOM. Keep it in variables and access it that wayI hope those help you!
gxrobb sends brownie points to @khaduch :sparkles: :thumbsup: :sparkles:
:star2: 1283 | @khaduch |http://www.freecodecamp.com/khaduch
Math.floor()
function to get the whole number of minutes, and then the remainder function seconds % 60
to get the number of seconds left over. But it just makes it easier overall - you don't have to check both minutes and seconds to see if you're down to 0
, and you don't have to get complicated about tracking the number of minutes and seconds and testing that each time.
gxrobb sends brownie points to @khaduch :sparkles: :thumbsup: :sparkles:
:warning: gxrobb already gave khaduch points
jluboff sends brownie points to @esayago :sparkles: :thumbsup: :sparkles:
:cookie: 286 | @esayago |http://www.freecodecamp.com/esayago
:cookie: 342 | @sorinr |http://www.freecodecamp.com/sorinr
joshfaggion11 sends brownie points to @sorinr :sparkles: :thumbsup: :sparkles:
sanchit13 sends brownie points to @tylermoeller :sparkles: :thumbsup: :sparkles:
:cookie: 580 | @tylermoeller |http://www.freecodecamp.com/tylermoeller
#aboutMe p{
position:relative;
left:10%;
color:#999999;
text-align: left;
width:900px;
}
left: 10%
for example. http://getbootstrap.com/css/#grid-offsetting
miciah123 sends brownie points to @ocarno5 :sparkles: :thumbsup: :sparkles:
:cookie: 122 | @ocarno5 |http://www.freecodecamp.com/ocarno5
rhcpsnow sends brownie points to @sorinr :sparkles: :thumbsup: :sparkles:
:cookie: 343 | @sorinr |http://www.freecodecamp.com/sorinr
document.getElementById("displayQuote").innerHTML = data.quote;
pae4557 sends brownie points to @tylermoeller :sparkles: :thumbsup: :sparkles:
:cookie: 581 | @tylermoeller |http://www.freecodecamp.com/tylermoeller
srishti-learner sends brownie points to @ocarno5 :sparkles: :thumbsup: :sparkles:
:cookie: 123 | @ocarno5 |http://www.freecodecamp.com/ocarno5
navigator.geolocation
only works in secure sites?
https
to get it to work, otherwise no go.
function create(arg) {
var createdArr = myData.query.search;
$(createdArr).each(function(index, value) {
$(this).fadeIn('1000', function() {
$('.wikiInfo').append('<a href="https://en.wikipedia.org/wiki/' + value.title + '"><div class="eachEntry">' + value.title + '<br>' + value.snippet + '</div></a>');
});
});
};
Let me ask you this! Shouldn't this fadeIn()
fade in each iteration of the .wikiInfo
??!!
li { padding: 10px; margin: 10px; }
if the default padding and margin isn't suitable? IS that what you're after?
sciencecoder sends brownie points to @khaduch :sparkles: :thumbsup: :sparkles:
:star2: 1284 | @khaduch |http://www.freecodecamp.com/khaduch
waynebunch sends brownie points to @jdtdesigns :sparkles: :thumbsup: :sparkles:
:cookie: 452 | @jdtdesigns |http://www.freecodecamp.com/jdtdesigns
sciencecoder sends brownie points to @tylermoeller :sparkles: :thumbsup: :sparkles:
:cookie: 582 | @tylermoeller |http://www.freecodecamp.com/tylermoeller
sciencecoder sends brownie points to @ocarno5 :sparkles: :thumbsup: :sparkles:
:cookie: 124 | @ocarno5 |http://www.freecodecamp.com/ocarno5
background-color: rgba(0,0,0,0.5);
fiddle with that last number to get the right transparency (alpha)
.navbar {
background-color: rgba(0, 0, 0, 0.3);
box-shadow: 0px 5px 15px rgba(0, 0, 0, 0.7);
}
konikodes sends brownie points to @tadake :sparkles: :thumbsup: :sparkles:
:cookie: 390 | @tadake |http://www.freecodecamp.com/tadake
here's the head tag
<head>
<script src="js/jquery.js"></script>
<script src="js/handlebars-v3.0.3.js"></script>
<script src="test.js"></script>
<script src="data.js"></script>
<script src="js/bootstrap.js"></script>
<link href="css/bootstrap.css" rel="stylesheet">
<link href="css/gallery.css" rel="stylesheet">
</head>
vinhloc30796 sends brownie points to @konikodes :sparkles: :thumbsup: :sparkles:
:cookie: 284 | @konikodes |http://www.freecodecamp.com/konikodes
tuliodnw sends brownie points to @tadake :sparkles: :thumbsup: :sparkles:
:cookie: 391 | @tadake |http://www.freecodecamp.com/tadake
m-oliv sends brownie points to @stephenmansfield :sparkles: :thumbsup: :sparkles:
:cookie: 305 | @stephenmansfield |http://www.freecodecamp.com/stephenmansfield
m-oliv sends brownie points to @konikodes :sparkles: :thumbsup: :sparkles:
:cookie: 285 | @konikodes |http://www.freecodecamp.com/konikodes
vinhloc30796 sends brownie points to @konikodes :sparkles: :thumbsup: :sparkles:
:warning: vinhloc30796 already gave konikodes points
event.preventDefault()
in your click handler $("#submit").on("click", function(event){
event.preventDefault();
var search = $("#search").val();
esayago sends brownie points to @mutantspore :sparkles: :thumbsup: :sparkles:
:star2: 1726 | @mutantspore |http://www.freecodecamp.com/mutantspore
esayago sends brownie points to @mutantspore :sparkles: :thumbsup: :sparkles:
:warning: esayago already gave mutantspore points
{
designer :
coder :
biologist :
astronomer :
educator :
}
url='https://api.twitch.tv/kraken/'
is base url,url + 'stream/<yourstreamer>
url + 'chat/<yourstreamer>/emoticons'
etc... each returns object with data in it.
//Setup
var contacts = [
{
"firstName": "Akira",
"lastName": "Laine",
"number": "0543236543",
"likes": ["Pizza", "Coding", "Brownie Points"]
},
{
"firstName": "Harry",
"lastName": "Potter",
"number": "0994372684",
"likes": ["Hogwarts", "Magic", "Hagrid"]
},
{
"firstName": "Sherlock",
"lastName": "Holmes",
"number": "0487345643",
"likes": ["Intriguing Cases", "Violin"]
},
{
"firstName": "Kristian",
"lastName": "Vos",
"number": "unknown",
"likes": ["Javascript", "Gaming", "Foxes"]
}
];
function lookUpProfile(firstName, prop){
// Only change code below this line
for (var i=0; i<contacts.length;i++){
for (var j=0; j<contacts[i].length;j++){
if (contacts[i][j].hasOwnProperty(firstName) ===true)
{if (contacts[i][j].hasOwnProperty(prop) ===true){
return contacts[firstName][prop];
}else return "No such property";
}else return "No such contact";
}//for loop j close
}//for loop i close
// Only change code above this line
}
// Change these values to test your function
lookUpProfile("Akira", "address");
@IJACOBS - profile lookup. First thing - you do not need a nested for
loop - one for
loop is sufficient. Your outer loop will iterate through the array of contacts, which are objects, and the body of the code in the for
loop will access the objects one at a time to check for the property (which you are using .hasOwnProperty
for, perhaps not correctly at this time.) So you can start there by removing that inner for
and then see where you're at.
The first thing that you want to check for is a match between the firstName
argument to the function, and the firstName
property in the contact under examination. Each object has a firstName
property, so that is a straightforward comparison, no need for .hasOwnProperty
there.
newtonxu sends brownie points to @bscyrpt :sparkles: :thumbsup: :sparkles:
:cookie: 282 | @bscyrpt |http://www.freecodecamp.com/bscyrpt
lahowitt sends brownie points to @bscyrpt :sparkles: :thumbsup: :sparkles:
:cookie: 283 | @bscyrpt |http://www.freecodecamp.com/bscyrpt
jonsnow08 sends brownie points to @cameron-burkholder :sparkles: :thumbsup: :sparkles:
:cookie: 370 | @cameron-burkholder |http://www.freecodecamp.com/cameron-burkholder
@media screen (min-width:768px){
.cssclass {width:somesize;}
}
}
@media screen (min-width:1024px){
.cssclass{width:differentsize;}
}
}
etc... so this anything between 768-1023 would be the first, the others would be the second and so one