dzrana sends brownie points to @dave1089 :sparkles: :thumbsup: :sparkles:
:cookie: 364 | @dave1089 |http://www.freecodecamp.com/dave1089
dueldrawer8 sends brownie points to @itsacoyote :sparkles: :thumbsup: :sparkles:
:cookie: 203 | @itsacoyote |http://www.freecodecamp.com/itsacoyote
if (this == order[i]){ // is not correct. it's comparing an object to a string
var i
when your setTimeout is called is probably not what you think it is. console.log( i ) inside your setTimout callback. A possible solution is .bind function. dueldrawer8 sends brownie points to @itsacoyote :sparkles: :thumbsup: :sparkles:
:warning: dueldrawer8 already gave itsacoyote points
<span class='num'>7</span>
give it an id='mySeven'$('#mySeven').click(myFunction(7);
onclick='function()'
eval(str);
dueldrawer8 sends brownie points to @gregatgit and @itsacoyote :sparkles: :thumbsup: :sparkles:
:cookie: 217 | @itsacoyote |http://www.freecodecamp.com/itsacoyote
:cookie: 724 | @gregatgit |http://www.freecodecamp.com/gregatgit
In following example I have p.inner which has its children. I am using "<div style="clear:both;"></div>" to "clear" and make "Btn" appear on the right and under the "― Isaac Newton" which is also on the right.
My original code is:
<p class="inner">
<span class="quote">Gravity explains the motions of the planets, but it cannot explain who sets the planets in motion.</span>
<span class="nameOfAuthor">― Isaac Newton</span>
<div style="clear:both;"></div>
<span class="btn">Btn</span>
</p>
But what apprear in the inspect element of Chrome Dev Tools is this:
so here it has closed span.quote after span.nameOfAuthor even though span.btn was included as child of span.inner but it has moved it out of span.inner. Also it has added an empty <p> after span.btn Why is that?
labeebahmad414 sends brownie points to @itsacoyote :sparkles: :thumbsup: :sparkles:
:cookie: 220 | @itsacoyote |http://www.freecodecamp.com/itsacoyote
a:-webkit-any-link {
color: -webkit-link;
text-decoration: underline;
cursor: auto;
}
so you have to explicitly override it
robphat sends brownie points to @qualitymanifest :sparkles: :thumbsup: :sparkles:
:star2: 1322 | @qualitymanifest |http://www.freecodecamp.com/qualitymanifest
@olzhas2102
<div class="col-xs-12" align="center">
<h3>His career's time line:</h3>
<ul>
<li><b>1961</b>- He was offered the position of senior editor in Soviet Life magazine</li>
</ul>
</div>
Hi there
I am having problem here: my bullet points of <li> are placed very far from text itself
what to do?
li{
text-align: left;
}
you will see the dif
Looking for the feedback on Simon Game http://theonewhodo.es/simon-game/
I’m not sure why sometimes the sound does not play on mobile devices and sound buttons animation have a bit of the delay. I use preload="auto" but it does not help. For reference how it should work, you may have a look at the same project but on desktop. I've tested and did not notice similar problems there.
Here's the link to repo: https://github.com/ewathedoer/simon-game
hey does anyone have a minute to look over my "Random Quote Machine" code?
$(document).ready(function() {
$("#getMessage").on("click", function(){
$.getJSON("http://quotes.stormconsultancy.co.uk/random.json", function(json) {
var html = "<h2>" + json.quote + "</h2>";
$(".message").html(html);
});
});
});
im not getting a response from the api... does anyone know whats wrong?
2cool4school sends brownie points to @sorinr :sparkles: :thumbsup: :sparkles:
:cookie: 603 | @sorinr |http://www.freecodecamp.com/sorinr
etrupja sends brownie points to @sorinr :sparkles: :thumbsup: :sparkles:
:cookie: 604 | @sorinr |http://www.freecodecamp.com/sorinr
<div class="row">
<div class="col-md-4">
<img class="img-responsive" .... >
</div>
</div>
deepika-gupta sends brownie points to @markostefanovic :sparkles: :thumbsup: :sparkles:
:cookie: 214 | @markostefanovic |http://www.freecodecamp.com/markostefanovic
@AshanMohammed
you wrote
<img class="col-xs-12 col-md-4 img-responsive" src=""/>
your class="col-xs-12 col-md-
should be in a div and in then an img in that div
and... col-xs-12
that is the default - unless you want xs to something different than 12 you don't have to write anything
arvindarvee sends brownie points to @sorinr :sparkles: :thumbsup: :sparkles:
:cookie: 611 | @sorinr |http://www.freecodecamp.com/sorinr
bharat-kalluri sends brownie points to @dhcodes :sparkles: :thumbsup: :sparkles:
:star2: 1302 | @dhcodes |http://www.freecodecamp.com/dhcodes
margin: 0;
temiadesina sends brownie points to @gregatgit :sparkles: :thumbsup: :sparkles:
:cookie: 725 | @gregatgit |http://www.freecodecamp.com/gregatgit
<nav class="navbar navbar-default">
<div class="container-fluid">
<!-- Brand and toggle get grouped for better mobile display -->
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1" aria-expanded="false">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="#">Brand</a>
</div>
<div class="navbar-header page-scroll">
<button type="button" class="navbar-toggle collapse" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1">
<span class="sr-only">Toggle navigation</span> Menu<i class="fa fa-bars"></i>
</button>
<a href="#" class="navbar-brand">Brand</a>
</div>
janine9vn sends brownie points to @dhcodes :sparkles: :thumbsup: :sparkles:
:star2: 1304 | @dhcodes |http://www.freecodecamp.com/dhcodes
temiadesina sends brownie points to @dhcodes :sparkles: :thumbsup: :sparkles:
:star2: 1305 | @dhcodes |http://www.freecodecamp.com/dhcodes
@dhcodes thanks it was a spelling error
class="navbar-toggle collapse"
instead of
class="navbar-toggle collapsed"
temiadesina sends brownie points to @dhcodes :sparkles: :thumbsup: :sparkles:
:warning: temiadesina already gave dhcodes points
reference a post
tag a post
mention a post
nvm
So..... I am customizing navbar. I was able to change font color, size and menu item background color with custom css, but..... my css for a:hover and a:active is not doing anything, and I've apparently targeted the navbar brand img since it's a link. So can anyone help with why my a:hover css isn't doing anything, and how to target the menu items specifically, without targeting the brand img also. Here's what I have so far:
.navbar-red a {
font-size: 16px;
background-color: #ff5151;
color: #ffffff;
margin: 0 10px;
border-radius: 5px;
font-famiy: font-family: 'Montserrat', sans-serif;
}
.navbar-red a:active {
background-color: #000000;
color: #ffffff;
}
.navbar-red a:hover {
color: #ffffff;
background-color: #6f0d0d;
}
Initial draft of Random Quote Machine, critics/comments/observations are welcome :)
dhcodes sends brownie points to @sorinr :sparkles: :thumbsup: :sparkles:
:cookie: 612 | @sorinr |http://www.freecodecamp.com/sorinr
:cookie: 613 | @sorinr |http://www.freecodecamp.com/sorinr
:cookie: 217 | @markostefanovic |http://www.freecodecamp.com/markostefanovic
ashanmohammed sends brownie points to @sorinr and @markostefanovic and @gregatgit :sparkles: :thumbsup: :sparkles:
:cookie: 726 | @gregatgit |http://www.freecodecamp.com/gregatgit
jfsene sends brownie points to @sorinr :sparkles: :thumbsup: :sparkles:
:cookie: 614 | @sorinr |http://www.freecodecamp.com/sorinr
jfsene sends brownie points to @sorinr :sparkles: :thumbsup: :sparkles:
:warning: jfsene already gave sorinr points
jfsene sends brownie points to @vinaypuppal :sparkles: :thumbsup: :sparkles:
:cookie: 437 | @vinaypuppal |http://www.freecodecamp.com/vinaypuppal
Hi All, I am done with initial draft of wikipedia viewer. Please Take a look. It if functional but not fully ready yet aesthetically. Please let me know your suggestions. :grinning:
Would be great if someone could recommend some whether free whether API to solve this problem also it should be available over HTTPS
https://www.freecodecamp.com/challenges/show-the-local-weather
Open Weather API serves over HTTP because of that I get following error:
Mixed Content: The page at 'https://jsfiddle.net/' was loaded over HTTPS, but requested an insecure XMLHttpRequest endpoint 'http://api.openweathermap.org/data/2.5/weather?lat=31.561507300000002&lon=74.3168055'. This request has been blocked; the content must be served over HTTPS.
labeebahmad414 sends brownie points to @jjoshpoland :sparkles: :thumbsup: :sparkles:
:cookie: 266 | @jjoshpoland |http://www.freecodecamp.com/jjoshpoland
labeebahmad414 sends brownie points to @sorinr :sparkles: :thumbsup: :sparkles:
:cookie: 615 | @sorinr |http://www.freecodecamp.com/sorinr
Hi all, I have a question about the Calculator project. I can't seem to figure out how to create the grid layout for the calculatoer.
I know it would be easy if all the buttons were the same size, but I'd like to try a layout where I have a tall "=" button).
How do you guys go about creating a layout like that?
document.ready(function(){
$('#add').on("click",function(a){
var text = document.getElementById('#work');
var teeth = document.createTextNode("Text Entered!");
text.appendChild(teeth);
});
Why is my button not working?
#work
just use this var text = document.getElementById('work');
document.getElementById('work');
use this its working
mohammadhasham sends brownie points to @vinaypuppal :sparkles: :thumbsup: :sparkles:
:cookie: 438 | @vinaypuppal |http://www.freecodecamp.com/vinaypuppal
$('#work').append('sometext')
document.getElementById('txtarea')
returns <textarea rows="2" cols="50" id="txtarea"> </textarea>
so u cant access .val()
on it
var data = $("#txtarea").val();
now i am using this
.val()
is available in JQuery not in pure javascript @MohammadHasham
$('#work').append(data);
var text = document.getElementById('work');
var teeth = document.createTextNode(data);
text.appendChild(teeth);
appendChild
takes text node
<tr>
and <td>
in javascript and append it to <tbody>
<tbody id='things'>
</tbody>
var html = '<tr><td>'+data+'</tr></td>';
$("#things").append(html);
mohammadhasham sends brownie points to @vinaypuppal :sparkles: :thumbsup: :sparkles:
:warning: mohammadhasham already gave vinaypuppal points
@MohammadHasham this
```HTML<tbody id='things'>
</tbody>
```javascript
var html = '<tr><td>'+data+'</tr></td>';
$("#things").append(html);
mohammadhasham sends brownie points to @vinaypuppal :sparkles: :thumbsup: :sparkles:
:warning: mohammadhasham already gave vinaypuppal points
dhuddleston sends brownie points to @mariusgarbea and @aaroniush :sparkles: :thumbsup: :sparkles:
:cookie: 181 | @aaroniush |http://www.freecodecamp.com/aaroniush
:cookie: 341 | @mariusgarbea |http://www.freecodecamp.com/mariusgarbea
https://your-pen-url
https://crossorigin.me/http://api.openweatherapi.com/....
navigator.geolocation
works with only https
bgeraci714 sends brownie points to @vinaypuppal :sparkles: :thumbsup: :sparkles:
:cookie: 439 | @vinaypuppal |http://www.freecodecamp.com/vinaypuppal
#things
not on individual todo items
drbe4t sends brownie points to @dmdusang :sparkles: :thumbsup: :sparkles:
:cookie: 120 | @dmdusang |http://www.freecodecamp.com/dmdusang
if (valid == true)
{
$("#wer").wrap('<strike>');
valid = false;
}
else
{
$("#wer").append('<tr><td>'+data+'</td></tr>');
}
@MohammadHasham When you add items to your list, your code looks like this:
<td id="wer">
<tr>
<td>test1</td>
</tr>
<tr>
<td>test2</td>
</tr>
<tr>
<td>test3</td>
</tr>
</td>
When you wrap #wer
with <strike>
, you get:
<strike>
<td id="wer">
<tr>
<td>test1</td>
</tr>
<tr>
<td>test2</td>
</tr>
<tr>
<td>test3</td>
</tr>
</td>
</strike>
You need to fix your code so it puts the wrap around the individual items
mohammadhasham sends brownie points to @tylermoeller :sparkles: :thumbsup: :sparkles:
:cookie: 717 | @tylermoeller |http://www.freecodecamp.com/tylermoeller
@TylerMoeller but i am wrapping td not tr
<tbody id = "things">
<tr>
<td id = "wer">
</td>
</tr>
</tbody>
isnt that fine?
<td>test3</td>
, not the main <td id="wer">
or you'll end up striking out everything inside of that tag.
<div class="container-fluid">
<nav class="navbar navbar-inverse navbar-fixed-top">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#myNavbar">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="#">TEST</a>
</div>
<div class="collapse navbar-collapse" id="myNavbar">
<ul class="nav navbar-nav navbar-right">
<li class="active"><a href="#">LINK1</a>
<li><a href="#">LINK2</a>
<li><a href="#">LINK3</a>
</ul>
</div>
</nav>
</div>
@import "https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css";
dzrana sends brownie points to @drbe4t :sparkles: :thumbsup: :sparkles:
:cookie: 164 | @drbe4t |http://www.freecodecamp.com/drbe4t
<nav class="navbar navbar-default navbar-static-top">