li {display: inline;}
Then float both your ul and heading left.
border-radius: 50%
img-circle
and that isn't working, try rounded-circle
as your class name instead.
:star2: 1177 | @skycoder01 |http://www.freecodecamp.com/skycoder01
orangekulture sends brownie points to @skycoder01 :sparkles: :thumbsup: :sparkles:
<a name=
and that is no longer supported in HTML5. Use id=
instead of name=
for your in-page link instead.
$(document).ready()
?
jaizon sends brownie points to @skycoder01 :sparkles: :thumbsup: :sparkles:
:star2: 1179 | @skycoder01 |http://www.freecodecamp.com/skycoder01
jaizon sends brownie points to @jdtdesigns :sparkles: :thumbsup: :sparkles:
:cookie: 920 | @jdtdesigns |http://www.freecodecamp.com/jdtdesigns
@nikkilr88 I'm getting this error in the console:
Mixed Content: The page at 'https://s.codepen.io/nikkilr88/pen/JNKLPK?editors=0010' was loaded over HTTPS, but requested an insecure resource 'http://player.twitch.tv/?channel=tsm_dyrus&autoplay=true&muted=true'. This request has been blocked; the content must be served over HTTPS.
You'll want to call https://player.twitch.tv if you can
graciolli-f sends brownie points to @skycoder01 :sparkles: :thumbsup: :sparkles:
:star2: 1181 | @skycoder01 |http://www.freecodecamp.com/skycoder01
nikkilr88 sends brownie points to @skycoder01 :sparkles: :thumbsup: :sparkles:
:star2: 1182 | @skycoder01 |http://www.freecodecamp.com/skycoder01
nikkilr88 sends brownie points to @khaduch :sparkles: :thumbsup: :sparkles:
:star2: 2791 | @khaduch |http://www.freecodecamp.com/khaduch
$('button').on('click', function() {
var url = "https://quotesondesign.com/wp-json/posts?filter[orderby]=rand&filter[posts_per_page]=1&callback=" + $.now()
$.getJSON(url, function(data) ...
Failed to read the 'sessionStorage' property from 'Window': Access is denied for this document.
I think the main one might be along the lines of what Ken said - something with how you are getting user data, because of this error:
Uncaught TypeError: Cannot read property 'channel' of undefined
if (data.follows[i].channel.logo === null) {
nikkilr88 sends brownie points to @skycoder01 :sparkles: :thumbsup: :sparkles:
:warning: nikkilr88 already gave skycoder01 points
nikkilr88 sends brownie points to @jdtdesigns :sparkles: :thumbsup: :sparkles:
:cookie: 921 | @jdtdesigns |http://www.freecodecamp.com/jdtdesigns
Hello again @jdtdesigns ! Okay, so im getting into the PHP language and noticed there is MySQL....
am I correct in saying that you can use PHP without MySQL, but you cant use MySQL without PHP?
I have the code from earlier.....
'''<form action="https://formspree.io/email.com"
method="POST">
Text <input type="text" name="name">
Email <input type="email" name="_replyto">
<input type="submit" value="Send">
</form>'''
misaiah sends brownie points to @jdtdesigns :sparkles: :thumbsup: :sparkles:
:cookie: 922 | @jdtdesigns |http://www.freecodecamp.com/jdtdesigns
thinkc sends brownie points to @kirbyedy :sparkles: :thumbsup: :sparkles:
:star2: 2038 | @kirbyedy |http://www.freecodecamp.com/kirbyedy
If i keep a key button like A or S pressed down all the time, eventually the transform effect (yellow border appearing) doesn't go away. If i simply tap A a class of Playing is added and then removed. I noticed that if i comment out a certain statement it works like it's supposed to. Why?
eval()
function but input is limited to digits, numbers and operators. Secondly, I created a function to check if last number has any decimal point (.) so no multiple decimals in the same number allowed (please test). Finally, I also used a function to trim the result if it is longer than 13 characters. Please also test. I know it is a lot to ask, but please, if you have the time, give me some feedback. Thanks all
oblanao sends brownie points to @fortmaximus :sparkles: :thumbsup: :sparkles:
:cookie: 741 | @fortmaximus |http://www.freecodecamp.com/fortmaximus
eval
too (if you like to handle them too), like: 2--2
#main { margin: 0 auto;}
and #main {text-align: center;}
which both seemed to do nothing
div {
margin-left: auto;
margin-right: auto;
width: 6em
}
...
<div>
something like this @tstusr441
tstusr441 sends brownie points to @heroiczero :sparkles: :thumbsup: :sparkles:
:star2: 1185 | @heroiczero |http://www.freecodecamp.com/heroiczero
$('document').ready(function () {
$('#get-quote').on('click', function(e) {
$.ajax({
url: 'http://quotesondesign.com/wp-json/posts?filter[orderby]=rand&filter[posts_per_page]=1',
dataType: 'jsonp',
success: function(response) {
console.log(response);
},
}).fail(function(response) {
console.log(response);
});
});
});
Anyone know what's wrong with the code? I get the object when i fire it right from the address bar on the browser. But when i use the button only the fail() runs
aceroad sends brownie points to @czpl :sparkles: :thumbsup: :sparkles:
:cookie: 271 | @czpl |http://www.freecodecamp.com/czpl
keonsam sends brownie points to @czpl :sparkles: :thumbsup: :sparkles:
:cookie: 272 | @czpl |http://www.freecodecamp.com/czpl
unovaxan sends brownie points to @czpl :sparkles: :thumbsup: :sparkles:
:cookie: 273 | @czpl |http://www.freecodecamp.com/czpl
function generateRandomNumber() {
random = Math.floor(Math.random() * 9) + 1;
}
clear
css attribute on a next element
display: flex
or inline-flex it's normal
$("#right-well").children().css("color", "orange");
SyntaxError: Unexpected end of input
anyone help me out, please?
$("#right-well").children().css("color", "orange");
but output is showing : SyntaxError: Unexpected end of input
i am struck here..please help me out..
my code here
:cookie: 267 | @omarraza |http://www.freecodecamp.com/omarraza
21stnomad sends brownie points to @omarraza :sparkles: :thumbsup: :sparkles:
omarraza sends brownie points to @gulptech :sparkles: :thumbsup: :sparkles:
:cookie: 304 | @gulptech |http://www.freecodecamp.com/gulptech
var getLocation = function (data) {
var lat=data.lat;
var countryCode = data.countryCode;
var lat= data.lat;
var lon=data.lon;
var city= data.regionName;
//The URL is missing imp
url = 'http://api.openweathermap.org/data/2.5/weather?' + 'lat=' + lat + '&lon=' + lon + '&APPID=fb063f0689099c757d885cb93e0a077c';
var units = 'imperial';
// Function to get the Weather info and display it.
getWeather = function (data) {
var temp = data.main.temp;
var tempUnit = units === 'metric' ? 'C' : 'F';
var windUnit = units === 'metric' ? ' meters/s' : ' miles/h';
var description = data.weather[0].description;
var code = data.weather[0].icon;
var wspeed = data.wind.speed;
// Create custom HTML to display all the information gathered.
var html = '<img src="http://openweathermap.org/img/w/' + code + '.png" alt="Weather Icon">' + '<p> ' + Math.round(temp) + ' ' + tempUnit + ', ' + description + '<br> Wind Speed: ' + wspeed + windUnit + '</p><p>' + city + ', ' + state + '</p>'
// Displays the custom HTML
$('#weather').html(html)
// Checks what kind style of temperature was used for dynamic background image.
switch (tempUnit) {
case 'F':
var temps = [90, 70, 32]
break;
case 'C':
temps = [32, 21, 0]
break;
}
// Array of background images.
var imgs = ['url("https://i.ytimg.com/vi/BQxBh-Oen1w/maxresdefault.jpg")', 'url("http://desertairproducts.com/application/files/2114/3352/6836/desert-palms.jpg)', 'url("http://i.imgur.com/voCuONs.jpg")', 'url("http://i.imgur.com/5tFHSKa.jpg")']
// Select custom background image according to temperature range.
if (temp >= temps[0]) {
$('body').css('background-image', imgs[0])
} else if (temp < temps[0] && temp >= temps[1]) {
$('body').css('background-image', imgs[1])
} else if (temp < temps[1] && temp >= temps[2]) {
$('body').css('background-image', imgs[2])
} else if (temp < temps[2]) {
$('body').css('background-image', imgs[3])
}
}
// Calls the Weather API
$.getJSON(url + 'imperial', getWeather, 'jsonp')
}
// When the documet finished loading call the Location API
$(document).ready(function () {
$.getJSON('http://ip-api.com/json', getLocation, 'jsonp')
// Handler for opetion between Metric and Imperial style temperature
$('input[type=radio][name=farenheit-celcius]').change(function () {
if ($('#f').is(':checked')) {
units = 'imperial'
} else {
units = 'metric'
}
$.getJSON(url + units, getWeather, 'jsonp')
})
})
'imperial'
at the end like that?
1. Fix your images (make sure they can be retreived via https) (it seems to work with http..but only after i view the image in a seperate window)
2. Add &units= to the end of the url = line (after your app id)
3. You city should point to data.city;
4. You are missing: var state = data.region; after the var city = data.city (once changed)
@Zacele You need to start simple with your own code. Those misspelled comments are in several codepen weather projects.
// get the location when the document is ready
$(document).ready(function() {
getLocation();
});
// Get the location and then get the weather when complete
function getLocation() {
$.getJSON('http://ip-api.com/json', getWeather);
}
function getWeather(position) {
// the position variable has all the location data from ip-api.com
console.log(position);
// add the lat and lon to the URL
var url = 'http://api.openweathermap.org/data/2.5/weather?' +
'lat=' + position.lat + '&lon=' + position.lon +
'&APPID=fb063f0689099c757d885cb93e0a077c&units=imperial'
// use getJSON with the URL above to get the weather data and study the JSON in the console to parse it
$.getJSON(url, function(weatherData) {
console.log(weatherData);
// Basic example of showing the temperature in your city
$('body').append('The temperature in ' + weatherData.name + ' is ' + weatherData.main.temp + 'F');
});
}
This is a very basic starter, learn how to parse the data that comes back and how to display it on your web page. Go one step at a time from there.
// When the documet finished loading call the Location API
<body>
<div class="container">
<div class ="row justify-content-center">
<div class="quote-box container">
<div class="row" id=view-quote>
</div>
<div class="row justify-content-between btn-row ">
<div class="col-md-4">
<button type="button" class="btn btn-primary"> tw </button>
</div>
<div class="col-md-4">
<button class="btn btn-primary" id=new-quote> Get New Quote </button>
</div>
</div>
</div>
</div>
</div>
</body>
$("#new-quote").on('click',function(){
$.ajaxSetup({cache:false});
$.getJSON("http://quotesondesign.com/wp-json/posts?filter[orderby]=rand&callback=", function(data) {
$("#view-quote").html(data[0].content + "— " + data[0].title)
});
});
https
for the URL in your getJSON call.
$("#new-quote").on('click', function() {
$.ajaxSetup({cache: false});
$.getJSON("https://quotesondesign.com/wp-json/posts?filter[orderby]=rand&callback=", function(data) {
$("#view-quote").html(data[0].content + "— " + data[0].title)
});
});
geekyinsights sends brownie points to @mot01 and @skycoder01 and @unovaxan :sparkles: :thumbsup: :sparkles:
:cookie: 276 | @unovaxan |http://www.freecodecamp.com/unovaxan
:star2: 1184 | @skycoder01 |http://www.freecodecamp.com/skycoder01
:cookie: 636 | @mot01 |http://www.freecodecamp.com/mot01
http://codepen.io/pen/
becomes https://codepen.io/pen/
encodeURIComponent('currentQuoteTweet')
Start with this HTML:
<a class="btn btn-block btn-social" href="https://twitter.com/intent/tweet?status=" target="_blank"><i class="fa fa-twitter"></i></a>
Then use javascript to update the HREF value.
$('.btn-social').attr('href', 'https://twitter.com/intent/tweet?status=' + encodeURIComponent(currentQuoteTweet));
getQuote();
//$("#newquote").on("click", getQuote());
$("#newquote").click((e) => getQuote());
$("#tweet").on("click", function() {
window.open("https://twitter.com/intent/tweet/?text=" + $(".quote").text() + " " + $(".author").text());
});
});
bablet sends brownie points to @skycoder01 :sparkles: :thumbsup: :sparkles:
:star2: 1185 | @skycoder01 |http://www.freecodecamp.com/skycoder01
@SkyCoder01 so I tested omething out
$('#Tab_Trigger1').click(function(){
var target = $(this).attr('href');
$('#Overview-Tab').removeClass('active');
$(target).addClass('active');
});
where TabTrigger1 is an id I put on the image div. active class never gets removed. active class never gets added. It is working though because if I change `$(target).empty()’ it does indeed empty that tab content
else{
for(var i = 3; i>=0 ;i--){
if(arr[i]!==0){
arr[i]--;
for(var x = i+1; x<5;x++){
if(x%2===0){
arr[x]=5;
}else{
arr[x]=9;
}
}
I only have two variables. maybe thats my problem. where are those variables you are using @moT01
function newQuote() {
var randomNumber = Math.floor(Math.random() * (quotes.length));
document.getElementById('quoteDisplay').innerHTML = quotes[randomNumber];
}
This is my function and my only other variable is an array of quotes called 'quotes'
@the-vampiire
@Czpl
Fixed it :) Turns out it was doing arr[5]--, twice when it equals 9
@the-vampiire
It's hard to rather explain but the way it works is, if arr[4] = 0; then it's going to find the first non-zero and it's going to replace all the numbers after that first non-zero into either 5 or 9
So 00:10:09
When that "09" hits "00" It will find the first non zero, Which is that 1, it will reduce it by 1 and set the rest to either 5 or 9 so, 00:09:59
waqas909 sends brownie points to @the-vampiire :sparkles: :thumbsup: :sparkles:
:cookie: 310 | @the-vampiire |http://www.freecodecamp.com/the-vampiire
[1,2,3,4,5].filter( function(num){
return true;
} );
result [1,2,3,4,5]
[1,2,3,4,5].filter( function(num){
return false;
} );
result []
[1,2,3,4,5].filter( function(num){
if (num > 3) {
return true;
} else {
return false;
}
} );
result [4,5]
<div class="col-xs-4">
<a href=https://twitter.com/intent/tweet/?text=" + $("newQuote()").text() + " " + $(".author").text()
target="_blank"><button class="btn btn-block btn-social"><i class="fa fa-twitter"></i></button></a>
</div>
</div>
<!--button for new quote-->
<div>
<div class="col-xs-8">
<button class="btn btn-block" onclick="newQuote()">New Quote</button>
<!--<script src="javascript.js"></script>-->
</div>
</div>
[1,2,3,4,5].filter(num => num > 3) // [4,5]
a27-suryansh sends brownie points to @moigithub :sparkles: :thumbsup: :sparkles:
:star2: 3159 | @moigithub |http://www.freecodecamp.com/moigithub
@SkyCoder01 muahaha solved
So to each project card (image with link) in the overview section I added the class “Overview_Tab”
Then built this JS
$('.Overview_Tab').click(function(){
var target = $(this).attr('href')+'-Tab';
var target_parent = $(target).parent();
$('#Overview-Tab').parent().removeClass('active');
target_parent.addClass('active');
});
document.getElement(<a>).href = "twitter.com.....";
ok this is finally starting to make sense. my new function in js looks like this:
function newQuote() {
var randomNumber = Math.floor(Math.random() * (quotes.length));
document.getElementById('quoteDisplay').innerHTML = quotes[randomNumber];
document.getElement(<a>).href = "twitter.com/intent/tweet/?text=" + $("newQuote()").text() "
}
now how do I update the html to talk to this correctly? I still have this:
div class="col-xs-4">
<a href=https://twitter.com/intent/tweet/?text=" + $("newQuote()").text() + " " + $(".author").text()
target="_blank"><button class="btn btn-block btn-social"><i class="fa fa-twitter"></i></button></a>
</div>
</div>
nikkilr88 sends brownie points to @jdtdesigns :sparkles: :thumbsup: :sparkles:
:cookie: 923 | @jdtdesigns |http://www.freecodecamp.com/jdtdesigns
href="#"
document.getElement(<a>).href = "https://twitter.com/intent/tweet/?text=" + "$("newQuote()").text()"
function newQuote() {
var randomNumber = Math.floor(Math.random() * (quotes.length));
document.getElementById('quoteDisplay').innerHTML = quotes[randomNumber];
document.getElementById('tweetCurrentQuote').href = "https://twitter.com/intent/tweet/?text=" + "$("newQuote()").text();
}
javascript change href
into google, and found this http://stackoverflow.com/questions/4365246/how-to-change-href-of-a-tag-on-button-click-through-javascript
// ----- Ajax Request and DOM input ----- //
$('#New_Quote').click(get_data);
function get_data(){
$.get("http://www.stands4.com/services/v2/quotes.php?uid=5663&tokenid=dvaVN4cQXhJcfkk9&searchtype=RANDOM", function(data) {
$(data).find('result').each(function(){
var quote = $(this).find('quote').text();
var author = $(this).find('author').text();
$('#quote').html(quote);
// optional add link to wikipedia for author...
// $('#author-link').attr('href','https://en.wikipedia.org/wiki/'+author);
$('#author').html(author);
$('#Tweet-Link').attr('href', "https://twitter.com/intent/tweet?text="+quote);
});
});
}
$('#Tweet-Link').attr('href', "https://twitter.com/intent/tweet?text="+quote);
function newQuote() {
var randomNumber = Math.floor(Math.random() * (quotes.length));
document.getElementById('quoteDisplay').innerHTML = quotes[randomNumber];
// document.getElementById('tweetCurrentQuote').href = "https://twitter.com/intent/tweet/?text=" + "$("newQuote()").text();
document.getElementById("tweetCurrentQuote").onclick = newQuote()
document.getElementById("tweetCurrentQuote").href= "https://twitter.com/intent/tweet/?text=" + "$("quoteDisplay").text();
return false;
};
}
kevnbot sends brownie points to @mot01 :sparkles: :thumbsup: :sparkles:
:cookie: 637 | @mot01 |http://www.freecodecamp.com/mot01
my function is very different from that. I dont use an outside website I use an array. It seems like im the only one who did it that way. So I dont have the variables 'quote' and 'author'
function newQuote() {
var randomNumber = Math.floor(Math.random() * (quotes.length));
document.getElementById('quoteDisplay').innerHTML = quotes[randomNumber];
document.getElementById('tweetCurrentQuote').href = "https://twitter.com/intent/tweet/?text="+ quotes[randomNumber];
}
kevnbot sends brownie points to @the-vampiire :sparkles: :thumbsup: :sparkles:
:cookie: 311 | @the-vampiire |http://www.freecodecamp.com/the-vampiire
<body>
<div class="container">
<div class="row">
<div class="col">
<input id="search" size="40" min="1" max="120" placeholder="Search for an article...">
</input>
</div>
<div class="col">
<button id="icon"><i class="fa fa-search"></i>
</button>
</div>
</div>
<div class="row">
<div class="col">
<a href="https://en.wikipedia.org/wiki/Special:Random" target="_blank"><button>Go to a random article
</button></a>
</div>
</div>
</div>
</body>
display: flex
on the container. This removes the bootstrap styling of the container and changes the behaviour of the children of the container totally.display: flex
on the container - both divs with the row
class, will be put in one row
.container {
position: relative;
left: 50%;
top: 50%;
transform: translate(-50%, -50%);
}
omarraza sends brownie points to @alpox :sparkles: :thumbsup: :sparkles:
:cookie: 975 | @alpox |http://www.freecodecamp.com/alpox
left: 50%
the left side of the element ends up in the middle of the page - which is not what you want.transform: translate
you can move the element according to its own dimensions
https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css
usamacjs sends brownie points to @alpox :sparkles: :thumbsup: :sparkles:
:cookie: 976 | @alpox |http://www.freecodecamp.com/alpox
text-align: center;
on the container<div class="col text-center">
if you only need to center single cols or elements
<div>
<img src="...">
</div>
class="img-fluid"
to the image: https://v4-alpha.getbootstrap.com/content/images/#responsive-images
img-responsive
is from boostrap v3. You are using boostrap v4 (new version) in your pen so img-responsive
does not work anymore.img-fluid
ssheorain sends brownie points to @alpox :sparkles: :thumbsup: :sparkles:
:cookie: 977 | @alpox |http://www.freecodecamp.com/alpox
ssheorain sends brownie points to @khaduch :sparkles: :thumbsup: :sparkles:
:star2: 2792 | @khaduch |http://www.freecodecamp.com/khaduch
I am working on a Web design project and am unable to get the menu bar on my site to display properly. I need the menu bar to be centered, but the code below doesn't work.
nav {
display: inline-block;
margin-left: auto;
margin-right: auto;
margin-bottom: 50px;
}
My HTML code:
<!doctype html>
<html lang="en-US">
<head>
<title>Table Template</title>
<meta charset="utf-8">
<link href="styles.css" rel="stylesheet" type="text/css">
</head>
<body>
<div class="fluid">
<!--Copy the navigation bar to any new pages under '<div class="fluid">'.-->
<!--Navigation Bar-->
<nav>
<label for="show-menu" class="show-menu">Show Menu</label>
<input type="checkbox" id="show-menu" role="button">
<ul id="menu">
<li><a href="#">Home</a></li>
<li>
<a href="#">Platforms ↓</a>
<ul class="hidden">
<li><a href="#">Android</a></li>
<li><a href="#">OS's w/ Dark Theme</a></li>
<li><a href="#">Windows</a></li>
</ul>
</li>
<li><a href="#">About</a></li>
<li><a href="#">Contact</a></li>
</ul>
</nav>
<!--End Navigation Bar-->
<div id="services">
<table>
<caption>Lorem</caption>
<tr>
<td><strong>App</strong></td>
<td><strong>Open Source</strong></td>
<td><strong>Source Code</strong></td>
</tr>
<tr>
<td><a>Ipsum</a></td>
<td>Yes/No</td>
<td><a href="" title="">Source Code</a></td>
</tr>
</table>
</div>
<!--End services-->
<!--Copy the footer to any new pages just before the last </div>-->
<!--Footer-->
<footer>
<ul>
<li><a href="https://github.com/ImSeth/Dark-Theme-Everywhere" title="Dark Theme Everywhere on Github"><img src="assets\GitHub-Mark-Light-64px.png" alt="Github Mark" /></a></li>
</ul>
</footer>
<!--End Footer-->
</div>
<!--end fluid-->
</body>
</html>
My CSS:
.fluid {
margin-left: auto;
margin-right: auto;
width: 100%;
float: none;
display: block;
background-color:#222;
}
/*These styles control the appearence of the navigation bar for all pages.*/
nav {
display: inline-block;
margin-left: auto;
margin-right: auto;
margin-bottom: 50px;
}
/*Strip the ul of padding and list styling*/
nav ul {
list-style-type:none;
margin:0;
padding:0;
position: absolute;
}
/*Create a horizontal list with spacing*/
nav li {
display:inline-block;
float: left;
margin-right: 1px;
}
/*Style for menu links*/
nav li a {
display:block;
min-width:140px;
height: 50px;
text-align: center;
line-height: 50px;
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
color: #fff;
background: #2f3036;
text-decoration: none;
}
/*Hover state for top level links*/
nav li:hover a {
background: cadetblue;
}
/*Style for dropdown links*/
nav li:hover ul a {
background: aquamarine;
color: #2f3036;
height: 40px;
line-height: 40px;
}
/*Hover state for dropdown links*/
nav li:hover ul a:hover {
background: cadetblue;
color: #fff;
}
/*Hide dropdown links until they are needed*/
nav li ul {
display: none;
}
/*Make dropdown links vertical*/
nav li ul li {
display: block;
float: none;
}
/*Prevent text wrapping*/
nav li ul li a {
width: auto;
min-width: 100px;
padding: 0 20px;
}
/*Display the dropdown on hover*/
nav ul li a:hover + .hidden, .hidden:hover {
display: block;
}
/*Style 'show menu' label button and hide it by default*/
.show-menu {
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
text-decoration: none;
color: #fff;
background: cadetblue;
text-align: center;
padding: 10px 0;
display: none;
}
/*Hide checkbox*/
nav input[type=checkbox]{
display: none;
}
/*Show menu when invisible checkbox is checked*/
nav input[type=checkbox]:checked ~ #menu{
display: block;
}
display: block
position: relative;
left: 50%;
transform: translateX(-50%);
display: block;
already.
usamacjs sends brownie points to @alpox :sparkles: :thumbsup: :sparkles:
:cookie: 978 | @alpox |http://www.freecodecamp.com/alpox
mdmpdx sends brownie points to @khaduch :sparkles: :thumbsup: :sparkles:
:star2: 2793 | @khaduch |http://www.freecodecamp.com/khaduch
a { background-color: green;}
but it's done nothing...
katsaldivar sends brownie points to @orangekulture :sparkles: :thumbsup: :sparkles:
:cookie: 335 | @orangekulture |http://www.freecodecamp.com/orangekulture
katsaldivar sends brownie points to @skycoder01 :sparkles: :thumbsup: :sparkles:
:star2: 1186 | @skycoder01 |http://www.freecodecamp.com/skycoder01
var url= "http://quotesondesign.com/wp-json/posts?filter[orderby]=rand&filter[posts_per_page]=1&_jsonp=mycallback";
$.getJSON(url, function(data){
console.log(data.title);
});
var url= "https://quotesondesign.com/wp-json/posts?filter[orderby]=rand&filter[posts_per_page]=1";
$.getJSON(url, function(data){
console.log(data[0].title);
https:
katsaldivar sends brownie points to @skycoder01 :sparkles: :thumbsup: :sparkles:
:warning: katsaldivar already gave skycoder01 points
var url= "http://quotesondesign.com/wp-json/posts?filter[orderby]=rand&filter[posts_per_page]=1" + $.now();
katsaldivar sends brownie points to @skycoder01 :sparkles: :thumbsup: :sparkles:
:warning: katsaldivar already gave skycoder01 points
callback=
that's still needed :)var url= "https://quotesondesign.com/wp-json/posts?filter[orderby]=rand&filter[posts_per_page]=1&callback="+ $.now();
paradox5 sends brownie points to @skycoder01 :sparkles: :thumbsup: :sparkles:
:star2: 1187 | @skycoder01 |http://www.freecodecamp.com/skycoder01
katsaldivar sends brownie points to @skycoder01 :sparkles: :thumbsup: :sparkles:
:warning: katsaldivar already gave skycoder01 points
hi guys. can someone explain to me how this code works and why is it displaying a pyramid. code is:
for (var i = 0; i < 5; i++ ){
for(var c = 0 ; c <= i; c++){
document.write("*");
}
document.write("<br>");
}
output:
*
**
***
****
like im confused how did the computer or the code knows that it should display 2 stars on the second row, 3 stars on the row and so on. i know the <br> is in there to make a line after the loop. but like why is it displaying 2 stars together 3, 4,
mdmpdx sends brownie points to @jaizon :sparkles: :thumbsup: :sparkles:
:cookie: 121 | @jaizon |http://www.freecodecamp.com/jaizon
mdmpdx sends brownie points to @jaizon :sparkles: :thumbsup: :sparkles:
:warning: mdmpdx already gave jaizon points