:cookie: 886 | @sorinr |http://www.freecodecamp.com/sorinr
waqas909 sends brownie points to @sorinr :sparkles: :thumbsup: :sparkles:
+
after each font name
|
navbar-left
class, and do text-align: center
to the tabcenter
class
;
..? or you fixed that
<head lang="en">
<title>Personal Portfolio</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link href="https://fonts.googleapis.com/css?family=Abel|Amatic+SC
|Raleway:100,200,300,400,500,600,700,800,900" rel="stylesheet">
<link rel="stylesheet" href="portfolio.css">
<link rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.1/css/
bootstrap.min.css"/>
<link rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/
font-awesome/4.7.0/css/font-awesome.min.css"/>
<script type="text/javascript" src="portfolio.js"></script>
<script src="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/
js/bootstrap.min.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs
/jquery/1.11.3/jquery.min.js"></script>
</head>
nitinraghav sends brownie points to @cysonya :sparkles: :thumbsup: :sparkles:
:cookie: 344 | @cysonya |http://www.freecodecamp.com/cysonya
twitchy-cake sends brownie points to @cysonya :sparkles: :thumbsup: :sparkles:
:cookie: 345 | @cysonya |http://www.freecodecamp.com/cysonya
twitchy-cake sends brownie points to @benstoica :sparkles: :thumbsup: :sparkles:
:cookie: 217 | @benstoica |http://www.freecodecamp.com/benstoica
navbar-header
div
navbar-header
has a width of 100% so text-align will know how to center it
navbar-header
did you try that?
grantknaver sends brownie points to @twitchy-cake :sparkles: :thumbsup: :sparkles:
:cookie: 220 | @twitchy-cake |http://www.freecodecamp.com/twitchy-cake
javineya sends brownie points to @tylermoeller :sparkles: :thumbsup: :sparkles:
:star2: 1070 | @tylermoeller |http://www.freecodecamp.com/tylermoeller
merrylarok sends brownie points to @cysonya :sparkles: :thumbsup: :sparkles:
:cookie: 346 | @cysonya |http://www.freecodecamp.com/cysonya
grantknaver sends brownie points to @twitchy-cake :sparkles: :thumbsup: :sparkles:
:warning: grantknaver already gave twitchy-cake points
e.keyCode == 13
e.keyCode
in your start()
instead of e.which
grantknaver sends brownie points to @cysonya :sparkles: :thumbsup: :sparkles:
:cookie: 347 | @cysonya |http://www.freecodecamp.com/cysonya
e.preventDefault()
enter
keypress (I did a console log in it, and it's showing). Just need to figure out how to prevent page refresh
submit()
going to take a look
.submit()
instead of just calling your getApiInfo
?
$('#mainInput').keypress(function(e) {
if (e.keyCode == 13) {
console.log('presssed');
$('#form1').submit(function(e) {
console.log('inside submit');
e.preventDefault();
});
}
});
start
function, basically on enter
keypress, it'll submit your form with id of form1
and prevent page from refreshing. So now inside submit you can call your get api function
$('#mainInput')
and $('#form1')
, the rest is all plain javascript I think
$("#main").show("slide", {direction: "left"}, 1000);
this should go inside your document ready function
show()
something, you need to first hide it with CSS
#main
will show
getApiInfo
to make the ajax call in order to display the data
messiahack sends brownie points to @mot01 :sparkles: :thumbsup: :sparkles:
:cookie: 326 | @mot01 |http://www.freecodecamp.com/mot01
display: none
not visibility
display: none
did the trick
messiahack sends brownie points to @cysonya :sparkles: :thumbsup: :sparkles:
:cookie: 348 | @cysonya |http://www.freecodecamp.com/cysonya
messiahack sends brownie points to @khaduch :sparkles: :thumbsup: :sparkles:
:star2: 2027 | @khaduch |http://www.freecodecamp.com/khaduch
blaisebev sends brownie points to @jolsoto :sparkles: :thumbsup: :sparkles:
:cookie: 120 | @jolsoto |http://www.freecodecamp.com/jolsoto
@Blaisebev
sorry css is wrong
change div class="text-align:center;" to div class="text-center"
blaisebev sends brownie points to @jolsoto :sparkles: :thumbsup: :sparkles:
:warning: blaisebev already gave jolsoto points
ul {
padding-left:0;
}
ul li {
list-style-position:inside
}
here
<p>Here's a timeline of Sir Edmund Hillary's Life:</p>
<div class="text-align:center;">
<ul>
class="text-center"
on your first line
text-align:center;
in css. remember all things that you want to change with design or structure is in the css
blaisebev sends brownie points to @heroiczero and @niconielsen and @jolsoto :sparkles: :thumbsup: :sparkles:
:warning: blaisebev already gave jolsoto points
:cookie: 462 | @heroiczero |http://www.freecodecamp.com/heroiczero
:cookie: 260 | @niconielsen |http://www.freecodecamp.com/niconielsen
<div class="text-align:center;">
that does not work if you want to use text-align:center;
you have to use it in CSS
and define it as a class
like .center
CSS
class text-center
i still suggest
@Blaisebev
maybe you need this on the cssul { padding-left:0; } ul li { list-style-position:inside }
blaisebev sends brownie points to @niconielsen :sparkles: :thumbsup: :sparkles:
:warning: blaisebev already gave niconielsen points
blaisebev sends brownie points to @niconielsen :sparkles: :thumbsup: :sparkles:
:warning: blaisebev already gave niconielsen points
<!Doctype html>
<html>
<head>
<title>Labs Test</title>
<link href="https://fonts.googleapis.com/css?family=Montserrat:400,700" rel="stylesheet">
<link href="https://fonts.googleapis.com/css?family=Roboto:400,500" rel="stylesheet">
<link rel="stylesheet" href="sugarlabs.css" type="text/css" media="screen" title="no title" charset="utf-8">
</head>
<body>
<div class="top">
<h1>Design</h1>
</div>
<div class="middle">
<img src="C:/Users/Japneet/Desktop/XO.png" alt="XO image">
</div>
<div class="buttons">
<button class="button">Drupa</button>
<button class="button">Drupa</button>
<button class="button">Drupa</button>
<button class="button">Drupa</button>
<button class="button">Drupa</button>
<button class="button">Drupa</button>
<button class="button">Drupa</button>
</div>
</body>
</html>
.buttons > .new {
position: relative;
margin-left: 80px;
}
designercoder123 sends brownie points to @nitinnair89 :sparkles: :thumbsup: :sparkles:
:cookie: 357 | @nitinnair89 |http://www.freecodecamp.com/nitinnair89
$("#streamers:last").append("<div class='streamers prime'><img src='https://68.media.tumblr.com/b01c74040cf2f9d80201f2bba6b0a88a/tumblr_ohnedqqqIV1sj6gx1o1_400.png'><span>Twitch Prime <em>Free for 30 days</em></span>");
animated
instead of "Animated". I hope you have added "Animate.css" in your <head>
section of the page. @Ash1108
<script>
tag.
@Ash1108 in addition to Nitin's advice, your elements with the .button
class need to be inline-blocks to work with animate.css. Make sure your CSS has:
.button {
display: inline-block;
}
So, if they're <span> or <a> at the moment, make sure that CSS is applied
mr-kumar-abhishek sends brownie points to @nitinnair89 :sparkles: :thumbsup: :sparkles:
:cookie: 358 | @nitinnair89 |http://www.freecodecamp.com/nitinnair89
tommygebru sends brownie points to @nitinnair89 :sparkles: :thumbsup: :sparkles:
:cookie: 359 | @nitinnair89 |http://www.freecodecamp.com/nitinnair89
.btn
class in your <a>
tag
bpalij sends brownie points to @kirbyedy :sparkles: :thumbsup: :sparkles:
:star2: 1613 | @kirbyedy |http://www.freecodecamp.com/kirbyedy
$('iframe').attr('src', 'http://player.twitch.tv/?channel=' + valData.stream.channel);
I wonder because there are 2 twitch channels that are active(online)... how can I get one of them to be accepted?
can maybe somebody see my mistake, as to why i dont get sth back from openweather but when i hardcode the coordinates it works fine?!
$(document).ready(function() {
//needed variables
var lat;
var long;
//get Coordinates
if (navigator.geolocation) {
navigator.geolocation.getCurrentPosition(function(position) {
lat = position.coords.latitude;
long = position.coords.longitude;
$("#data").html("lat: " + lat +" long: " + long);
});
}
//contact API with local position
var api = 'http://api.openweathermap.org/data/2.5/weather?lat='+lat+'&lon='+long+'&appid=21c945aa95f4a12c84d534290a234175';
$.getJSON(api, function(data) {
alert("!");
var weatherDes = data.weather[0].description;
});
});
agian
lynguist sends brownie points to @nitinnair89 :sparkles: :thumbsup: :sparkles:
:cookie: 360 | @nitinnair89 |http://www.freecodecamp.com/nitinnair89
http
and https
maybe some workaround ? Mr-Kumar-Abhishek/random-quote-machine#2
mr-kumar-abhishek sends brownie points to @sorinr :sparkles: :thumbsup: :sparkles:
:cookie: 887 | @sorinr |http://www.freecodecamp.com/sorinr
wong3030 sends brownie points to @nitinnair89 :sparkles: :thumbsup: :sparkles:
:cookie: 361 | @nitinnair89 |http://www.freecodecamp.com/nitinnair89
var measure = (func) => {
console.time('execution time');
func();
console.timeEnd('execution time');
};
var mapWith = (predicate, list) => () => list.map(predicate);
var square = x => x * x;
var list = [2, 4, 6, 8, 10];
measure(mapWith(square, list));
mr-kumar-abhishek sends brownie points to @sorinr :sparkles: :thumbsup: :sparkles:
:warning: mr-kumar-abhishek already gave sorinr points
mr-kumar-abhishek sends brownie points to @sorinr :sparkles: :thumbsup: :sparkles:
:cookie: 888 | @sorinr |http://www.freecodecamp.com/sorinr
zkruki sends brownie points to @sorinr :sparkles: :thumbsup: :sparkles:
:cookie: 889 | @sorinr |http://www.freecodecamp.com/sorinr
I'm trying to build a tribute page and for some reason my footer always gets inserted ::before a table. Could you advise on what might be the issue?
So can anybody help with this one please? I've got one footer working as intended, but the next one does not move to the bottom of the page.
orcscanprogram sends brownie points to @mr-kumar-abhishek :sparkles: :thumbsup: :sparkles:
:cookie: 410 | @mr-kumar-abhishek |http://www.freecodecamp.com/mr-kumar-abhishek
function goTo(){
var title=$("#search-input").val();
goToTitle(title);
};
function goToTitle(title){
title=encodeURIComponent(title)
var link="https://en.wikipedia.org/w/api.php?action=opensearch&search="+title+"&limit=1&namespace=0&format=json";
$("#problem").css("visibility","visible");
$.getJSON(link,function (json){
$("#problem").css("visibility","hidden");
moveTo(json);
});
};
function moveTo(json){
console.log(json);
};
style="margin-top: 3.125em; background-color: #540E24;"
to the css part of the codepen. inline styling its used now more on html email templates for example
var obj = [{
"tagValueName": "PCI",
"tagValueId": 1,
"priorityAlertsCount": 20,
"investigationAlertsCount": 140,
"incidentAlertsCount": 100,
"otherAlertsCount": 40
}];
var children = [{"name": "priorityAlertsCount", "size": 20}];
I want to add the children array to obj object, any hekp on this ??
var obj = [{
"tagValueName": "PCI",
"tagValueId": 1,
"priorityAlertsCount": 20,
"investigationAlertsCount": 140,
"incidentAlertsCount": 100,
"otherAlertsCount": 40
}];
var children = {"name": "priorityAlertsCount", "size": 20};
obj.push(children)
&callback=?
or ?callback=?
to the API URL to treat the request as JSONP and work around CORS issues
callback=?
functionality?
jsonp=?
, it is usually in the documentation
sparklie3 sends brownie points to @tylermoeller and @sorinr :sparkles: :thumbsup: :sparkles:
:cookie: 890 | @sorinr |http://www.freecodecamp.com/sorinr
:star2: 1071 | @tylermoeller |http://www.freecodecamp.com/tylermoeller
can anyone explain me this snippet of code
function multiplier(factor)
{
return function(number)
{
return factor;
};
}
var twice = multiplier(2);
console.log(twice(2));
How is he passing '2' to a variable 'twice'
this code is working
@sorinr
zkruki sends brownie points to @tylermoeller :sparkles: :thumbsup: :sparkles:
:star2: 1072 | @tylermoeller |http://www.freecodecamp.com/tylermoeller
n0ahhhhh sends brownie points to @sorinr :sparkles: :thumbsup: :sparkles:
:cookie: 891 | @sorinr |http://www.freecodecamp.com/sorinr
Okay,. I'm still stuck on the local weather thing... I was able to get my coordinates, but now when I try to access the OpenWeatherAPI with the following code, I get an ERR_CONNECTION_REFUSED message.
```
function getCity(latNum,lonNum) {
$.getJSON("https://api.openweathermap.org/data/2.5/weather?lat=" + latNum + "&lon=" + lonNum + "&appid=" + appId, function(data){
cityName = data.name;
$("#city").html("Your city is: " + cityName);
});
};
function getCity(latNum,lonNum) {
$.getJSON("http://api.openweathermap.org/data/2.5/weather?callback=?&lat=" + latNum + "&lon=" + lonNum + "&appid=" + appId, function(data){
cityName = data.name;
$("#city").html("Your city is: " + cityName);
});
};
?callback=?
in the URL for JSONP
lat=
&callback=?
"http://api.openweathermap.org/data/2.5/weather?lat=" + latNum + "&lon=" + lonNum + "&appid=" + appId + "&callback=?"
callback=?
to tell getJSON to treat the request as JSONP. The URL parameters begine with a ?
and are separated by &
n0ahhhhh sends brownie points to @tylermoeller :sparkles: :thumbsup: :sparkles:
:star2: 1073 | @tylermoeller |http://www.freecodecamp.com/tylermoeller
ERR_BLOCKED_BY_CLIENT
means it is your browser that is blocking the code, not the server
zkruki sends brownie points to @sorinr :sparkles: :thumbsup: :sparkles:
:cookie: 892 | @sorinr |http://www.freecodecamp.com/sorinr
ERR_BLOCKED_BY_CLIENT
No 'Access-Control-Allow-Origin' header is present
another problem related to the local weather challenge... I can access the weather info just fine now.. but in the "weather" array I'm expecting to see only one set of information.. (id, main, description, icon). However, I'm getting two different arrays within the weather array, like below
"weather":[{"id":501,"main":"Rain","description":"moderate rain","icon":"10n"},{"id":701,"main":"Mist","description":"mist","icon":"50n"}]
How do I go about accessing just the first "main" (rain)" I tried weather.[0].main, but that didn't work.
mohammadhasham sends brownie points to @sorinr :sparkles: :thumbsup: :sparkles:
:cookie: 893 | @sorinr |http://www.freecodecamp.com/sorinr
[{
"tagValueName": "Name1",
"tagValueId": 1,
"priorityAlertsCount": 20,
"investigationAlertsCount": 140,
},{
"tagValueName": "Name2",
"tagValueId": 1,
"priorityAlertsCount": 20,
"investigationAlertsCount": 140,
}]
I want to convert the above array into the below format
[
{
"tagValueName": "Name1",
"priorityAlertsCount": 20,
},
{
"tagValueName": "Name1",
"investigationAlertsCount": 20,
},
{
"tagValueName": "Name2",
"priorityAlertsCount": 20,
},
{
"tagValueName": "Name2",
"investigationAlertsCount": 20,
}
]
actually i am not able to access the values of object ...pls help as i am new to JS?
sparklie3 sends brownie points to @0sk4rgp :sparkles: :thumbsup: :sparkles:
:cookie: 265 | @0sk4rgp |http://www.freecodecamp.com/0sk4rgp
for (var prop in obj[0]){
console.log(obj[0][prop]);
}
:cookie: 894 | @sorinr |http://www.freecodecamp.com/sorinr
n0ahhhhh sends brownie points to @sorinr :sparkles: :thumbsup: :sparkles:
@sparklie3
actually I want to write a function that will accept the below array as input
input :-
[{
"tagValueName": "Name1",
"tagValueId": 1,
"priorityAlertsCount": 20,
"investigationAlertsCount": 140,
},{
"tagValueName": "Name2",
"tagValueId": 1,
"priorityAlertsCount": 20,
"investigationAlertsCount": 140,
}]
and will output the transformed array as below
[
{
"tagValueName": "Name1",
"priorityAlertsCount": 20,
},
{
"tagValueName": "Name1",
"investigationAlertsCount": 20,
},
{
"tagValueName": "Name2",
"priorityAlertsCount": 20,
},
{
"tagValueName": "Name2",
"investigationAlertsCount": 20,
}
]
can u help me with this?
obj[0].tagValueName;
ojb[0].priorityAlertCount;
var newArray = [{
'tagValueName': obj[0].tagValueName,
"priorityAlertsCount": obj[0].priorityAlertsCount
}]
charan1922 sends brownie points to @tylermoeller :sparkles: :thumbsup: :sparkles:
:star2: 1074 | @tylermoeller |http://www.freecodecamp.com/tylermoeller
const scrollAdjust = () => scrollBy(0, -50);
if (location.hash) scrollAdjust();
window.addEventListener('hashchange', scrollAdjust);
-50
to change how much space is above the headings
:star2: 1075 | @tylermoeller |http://www.freecodecamp.com/tylermoeller
lex131 sends brownie points to @tylermoeller :sparkles: :thumbsup: :sparkles:
lex131 sends brownie points to @tylermoeller :sparkles: :thumbsup: :sparkles:
:warning: lex131 already gave tylermoeller points
callback?
yes ?
ampersamd sends brownie points to @mr-kumar-abhishek :sparkles: :thumbsup: :sparkles:
:cookie: 411 | @mr-kumar-abhishek |http://www.freecodecamp.com/mr-kumar-abhishek
<div col-lg-2>
should be <div class="col-lg-2">
ampersamd sends brownie points to @tylermoeller :sparkles: :thumbsup: :sparkles:
:star2: 1076 | @tylermoeller |http://www.freecodecamp.com/tylermoeller
mr-kumar-abhishek sends brownie points to @tylermoeller :sparkles: :thumbsup: :sparkles:
:star2: 1077 | @tylermoeller |http://www.freecodecamp.com/tylermoeller
tylermoeller sends brownie points to @mr-kumar-abhishek :sparkles: :thumbsup: :sparkles:
:cookie: 412 | @mr-kumar-abhishek |http://www.freecodecamp.com/mr-kumar-abhishek
xor4 sends brownie points to @tylermoeller :sparkles: :thumbsup: :sparkles:
:star2: 1078 | @tylermoeller |http://www.freecodecamp.com/tylermoeller
@frankmaayn Give the characters / teams / players div
element an id or class and give them a background in css:
.characters-container {
background-color: red;
}
(Example for a class characters-container
)
hi guys. i have this inside the form:
<p class="Lname">Last Name:</p>
<input type="text" name="Lname" placeholder="LastName" maxlength="20" required/>
</br>
</br>
<p class="Fname">First Name:</p>
<input type="text" name="Fname" placeholder="FirstName" maxlength="20" required/>
</br>
</br>
<p class="Mname"> Middle Name:</p>
<input type="text" name="Mname" placeholder="MiddleName" maxlength="20" required/>
</br>
</br>
question is how would I float 3 elements to make them in a row??
function rot13(str) { // LBH QVQ VG!
var first13 = str.charCodeAt(0-12);
var second13 = str.charCodeAt(13-25);
var finalStr;
for (var i=0; i<str.length; i++) {
finalStr += 13;
second13 += 13;
}
return first13 + second13;
}
// Change the inputs below to test
rot13("SERR PBQR PNZC");
http://codepen.io/artoo/pen/ZBbYyM
how can i float the label and text are to make them in column.anyone??
mr-kumar-abhishek sends brownie points to @crlycstl :sparkles: :thumbsup: :sparkles:
:cookie: 262 | @crlycstl |http://www.freecodecamp.com/crlycstl
:warning: mr-kumar-abhishek already gave crlycstl points
mr-kumar-abhishek sends brownie points to @crlycstl :sparkles: :thumbsup: :sparkles:
mzedlach sends brownie points to @tylermoeller :sparkles: :thumbsup: :sparkles:
:star2: 1079 | @tylermoeller |http://www.freecodecamp.com/tylermoeller
Hi guys, does anyone know what is wrong with my code? I'm getting back "Unexpected identifier".
$(".textArea").keypress(function(e) {
if(e.which == 13) {
$(".btn2").click();
}
})
francorufo sends brownie points to @tylermoeller :sparkles: :thumbsup: :sparkles:
:star2: 1080 | @tylermoeller |http://www.freecodecamp.com/tylermoeller
artoodeeto sends brownie points to @tylermoeller :sparkles: :thumbsup: :sparkles:
:star2: 1081 | @tylermoeller |http://www.freecodecamp.com/tylermoeller
shortbusdriver sends brownie points to @tylermoeller :sparkles: :thumbsup: :sparkles:
:star2: 1082 | @tylermoeller |http://www.freecodecamp.com/tylermoeller
<head>
is for browsers and bots <header>
is for bots only :p
amazecpk sends brownie points to @tylermoeller :sparkles: :thumbsup: :sparkles:
:star2: 1083 | @tylermoeller |http://www.freecodecamp.com/tylermoeller
mzedlach sends brownie points to @tylermoeller :sparkles: :thumbsup: :sparkles:
:star2: 1084 | @tylermoeller |http://www.freecodecamp.com/tylermoeller
[text for the link](http://url)