Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • Aug 17 09:32
    User @bjorno43 unbanned @linkin-park
  • Jun 20 21:19
    @bjorno43 banned @shenerd140
  • Apr 25 17:13
    @mstellaluna banned @cmal
  • Jan 08 22:05
    @mstellaluna banned @dertiuss323
  • Nov 07 2018 04:42
    User @texas2010 unbanned @ows-ali
  • Nov 02 2018 16:25
    @texas2010 banned @ows-ali
  • Oct 12 2018 05:50
    @bjorno43 banned @NACH74
  • Oct 05 2018 23:02
    @mstellaluna banned @JomoPipi
  • Sep 16 2018 12:21
    @bjorno43 banned @yash-kedia
  • Sep 16 2018 12:16
    @bjorno43 banned @vnikifirov
  • Sep 05 2018 08:12
    User @bjorno43 unbanned @androuino
  • Sep 05 2018 07:38
    @bjorno43 banned @androuino
  • Aug 23 2018 16:57
    User @bjorno43 unbanned @rahuldkjain
  • Aug 23 2018 16:23
    @bjorno43 banned @rahuldkjain
  • Jul 29 2018 14:13
    User @bjorno43 unbanned @jkyereh
  • Jul 29 2018 01:00
    @bjorno43 banned @jkyereh
  • Jul 10 2018 22:09
    @bjorno43 banned @manafn
  • Jul 06 2018 15:20
    @texas2010 banned @imlegend19
  • Jul 03 2018 12:28
    @bjorno43 banned @vbvmatta
  • Jun 29 2018 13:54
    @bjorno43 banned @OGTechnoBoy
Ethan
@k3rb3r0us
Any tips on starting a blank web page? Having a sort of writers block and can't seem to remember the basics I just learned. I'm working on the "build a tribute page"
djangoearnhardt
@djangoearnhardt

Since I added

$('.toggle')on('click', function(){
$('.temp').html('<p>' + convertC + '&deg C</p>’);
My variables:
var tempF = Math.floor(((temp * (9/5)) - 459.67));
var convertC = (tempF -v32) * (5/9);

my page is behaving weird. I guess my actions are out of order now.

It won’t display the three API values I had previously defined...
Ian Duke
@1andee
@k3rb3r0us Maybe check out what other Campers made, for some inspiration? http://codepen.io/search/pens?q=tribute+page
kat-mag
@kat-mag
@k3rb3r0us set up your html tags. Get a heading, main content, footer... Then try to fill them up with something ;p
Ethan
@k3rb3r0us
Thanks @ianduke @kat-mag
Tyler Moeller
@TylerMoeller
@djangoearnhardt Remove the v from in front of the 32 on line 6. In your toggle click function, use indexOf to see if it is already displayed as F or C first. Then you know which temperature to switch to.
On toggle click, if temperature contains "F", display convertC, else display tempF
Aaron Bell
@awb715
okay
djangoearnhardt
@djangoearnhardt
thanks again @TylerMoeller
CamperBot
@camperbot
djangoearnhardt sends brownie points to @tylermoeller :sparkles: :thumbsup: :sparkles:
:cookie: 925 | @tylermoeller |http://www.freecodecamp.com/tylermoeller
Carl
@carlm7
What’s the best way to vertical align my menu in the middle so it’s level with my logo text? I could adjust the margin on the h1 tag by boot strap but that is cheating http://codepen.io/carlm7/pen/GNpvrZ
Ian Duke
@1andee
@carlm7
.nav > li {
  padding-top: 15px;
}
@carlm7 That's one way
Carl
@carlm7
@ianduke I was hoping to avoid using padding and just use a rule that would center it relative to where it is in it’s div
@ianduke Is there a way to set col-md-6 div height as 100% and then vertical align the contents of it
Ian Duke
@1andee
@carlm7 You could maybe try style="vertical-align:middle;"
Carl
@carlm7
@ianduke thanks i’ll take a look. I have tried various ways of making the div height 100% and none seem to be working unfortunately hmm keep on trying
CamperBot
@camperbot
carlm7 sends brownie points to @ianduke :sparkles: :thumbsup: :sparkles:
:cookie: 236 | @ianduke |http://www.freecodecamp.com/ianduke
djangoearnhardt
@djangoearnhardt

This was my effort @TylerMoeller, Something went astray

var convertF = tempF;                
var x = document.getElementsByClassName("temp");
$('.toggle').on('click', function(){
if (x.indexOf('F') > -1) {
$('.temp').html('<p>' + convertC + '&deg C</p>');}

  else if (x.indexOf('F') == -1) {
$('.temp').html('<p>' + tempF + '&deg F</p>');                
                }

http://codepen.io/djangoearnhardt/pen/NbxgKJ

Carl
@carlm7
@ianduke fixed it. I needed to target the container rather than the actual column
and use flexbox
Maksim Kulichenko
@makstheimba
@djangoearnhardt what is this sign in the end of page? And is your name really django?
kat-mag
@kat-mag
@djangoearnhardt what's that indexOf supposed to do?
djangoearnhardt
@djangoearnhardt
@makstheimba what sign, the image? and it isn’t :( but it’s a band I created
@kat-mag I was going to use the indexOf to search if the temperature displayed F, and if it did, then my toggle button would convert it to C
*or celcius
and vise versa
Tyler Moeller
@TylerMoeller
@djangoearnhardt You'll need to specify innerText to get the text inside that element:
    var convertC = Math.floor((tempF - 32) * (5 / 9));
    var convertF = tempF;
    $('.toggle').on('click', function() {
      var x = document.getElementsByClassName("temp")[0].innerText;
      if (x.indexOf('F') > -1) {
        $('.temp').html('<p>' + convertC + '&deg C</p>');
      } else {
        $('.temp').html('<p>' + tempF + '&deg F</p>');
      }
    });
And a [0] to indicate you want the first element with the class temp returned
Ian Duke
@1andee
@carlm7 never even heard of flexbox before. that's neat!
djangoearnhardt
@djangoearnhardt
hmmm, i’ll need to read on that but thank you @TylerMoeller. the [0] is still a little confusing. what other elements would be returned in that instance?
Tyler Moeller
@TylerMoeller
@djangoearnhardt Do console.log(document.getElementsByClassName("temp")) to study what you get back
Carl
@carlm7
@ianduke me neither, works well!
Tyler Moeller
@TylerMoeller
You can also use jQuery everywhere:
    var convertC = Math.floor((tempF - 32) * (5 / 9));
    var convertF = tempF;
    $('.toggle').on('click', function() {
      if ($('.temp').text().indexOf('F') > -1) {
        $('.temp').html('<p>' + convertC + '&deg C</p>');
      } else {
        $('.temp').html('<p>' + tempF + '&deg F</p>');
      }
    });
djangoearnhardt
@djangoearnhardt
ok, is the console.log something for trouble shooting when I’m coding
Tyler Moeller
@TylerMoeller
Yes, console.log is your friend :) tells you what variables are set to and helps for debugging
GitLub
@GitLub
Guys, any tips/guidelines of how I should aproach this first Tribute Page project? Any extra material to follow alongside? Having a hard time figuring out how to use what I learnt in the chalenges to actually build a website.
djangoearnhardt
@djangoearnhardt
hahah wow @TylerMoeller so much help, i really appreciate it
Maksim Kulichenko
@makstheimba
@djangoearnhardt yeah the image
djangoearnhardt
@djangoearnhardt
@makstheimba It’s supposed to be a beanie/hat for cold weather. and they change depending on the degrees outside
Maksim Kulichenko
@makstheimba
@djangoearnhardt okay. For now it looks like a tip of a penis.
djangoearnhardt
@djangoearnhardt
hahah, not my intent @makstheimba
Homer Allen
@homerallen
Hmmm, preparing to build my portfolio page. I wonder if the contact form on the example actually works...
It's not a user story, so I am not sure how to handle that
c0d0er
@c0d0er
any idea on how to make all my buttons dont have any space between each buttons? any idea for better design? http://codepen.io/c0d0er/pen/LRKVmE?editors=1100
Ian Duke
@1andee
@homerallen Rest assured the Form doesn't actually need to work.
Homer Allen
@homerallen
@ianduke ok, thanks!