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
linkin-park
@linkin-park
the header is not the same as the facebook
@heroiczero
and somewhere there is css conflict too :(
i have updated the code :! you can refresh sir @heroiczero
linkin-park
@linkin-park
@heroiczero any thoughts on this ?
Justin25
@Justin25
@linkin-park Facebook uses a linear gradient for their header
linkin-park @linkin-park googles linear gradient
Justin25
@Justin25
It's this background-image: linear-gradient(#4e69a2, #3b5998 50%);
Dušan Todorović
@krckyboy
What's better to use for social icons + hover effect - sprites, SVG or something else? Thank you.
linkin-park
@linkin-park
if i'm not mistaking the google says gradient are used when 2 or more color need smooth transition
Justin25
@Justin25
Yes
linkin-park
@linkin-park
in our case its just #fff
am i missing anything ??
Justin25
@Justin25
If you look at the header Facebook has, it's a lighter shade of blue towards the top
So it transitions from one shade of blue, #4e69a2, to another, #3b5998.
heroiczero
@heroiczero
@linkin-park i think what you should focus on the format and the layout of the webpage when it is in different screens (responsive) and how the user interacts with it.
@linkin-park but other than that so far. It is progressing well :+1:
linkin-park
@linkin-park
@heroiczero for the fact no one will use that snippet other than me :P so thankz for the help @Justin25
CamperBot
@camperbot
linkin-park sends brownie points to @heroiczero and @justin25 :sparkles: :thumbsup: :sparkles:
:cookie: 308 | @justin25 |http://www.freecodecamp.com/justin25
:star2: 1765 | @heroiczero |http://www.freecodecamp.com/heroiczero
linkin-park
@linkin-park
@Justin25 how did you find the color codes ?
linkin-park
@linkin-park
good eyes :) @Justin25
Liam Docherty
@ldocherty1

Can anyone help me with this? The code below is for smooth scrolling. My different parts on my webpages are called section followed by the numbers 1-5 as I have five sections. Can anyone help me make this function on my site?

function scrollNav() {
  $('.nav a').click(function(){
    //Toggle Class
    $(".active").removeClass("active");
    $(this).closest('li').addClass("active");
    var theClass = $(this).attr("class");
    $('.'+theClass).parent('li').addClass('active');
    //Animate
    $('html, body').stop().animate({
        scrollTop: $( $(this).attr('href') ).offset().top - 160
    }, 400);
    return false;
  });
  $('.scrollTop a').scrollTop();
}
scrollNav();

example of the html for my different sections going from section1-5

<section class="bg-home img-fluid" id="section1">
Tom
@moT01
got a pen? looks pretty close to something I used for that
the toggle class isnt related to the scrolling?
you have a listener inside a function
Liam Docherty
@ldocherty1

@moT01 Pen for the example site is https://codepen.io/mattsince87/pen/exByn

or what you talking about pen for my site? I'm trying to get the smooth scrolling on my site

Tom
@moT01
i think if you maybe just removed the function it might work
a pen for your site
so i can see all code
Liam Docherty
@ldocherty1
ok give me 5min thanks :)
Tom
@moT01
and i was asking what the toggle class is for?
or if you have the code on github or something you could link to that, and not have to make a pen
Justin25
@Justin25
@linkin-park No, just right click and then select "inspect element" on the menu that pops up.
shivam gupta
@shivamg11000
hey how can I use import in the client side code
I know I can use browserify for require()
Liam Docherty
@ldocherty1
@moT01 Got it to work thanks though for helping me
CamperBot
@camperbot
ldocherty1 sends brownie points to @mot01 :sparkles: :thumbsup: :sparkles:
:cookie: 861 | @mot01 |http://www.freecodecamp.com/mot01
Justin25
@Justin25

So I'm using react and this code correctly renders

var element;
    element += <p>{this.state.day0.uv}</p>;
    return <div className="forecast-weather">
      {element}
    </div>;

But this doesn't

var element;
    element + <p>{this.state.day0.uv}</p>;
    return <div className="forecast-weather">
      {element}
    </div>;
Why can't I use +=?
Tom
@moT01
you mean why can't you use +?
Justin25
@Justin25
Whoops those are backwards
Tom
@moT01
im wondering if you can't render element when it has no value, ...try giving it some value
var element = "";
Justin25
@Justin25
Oh I see, The variable has to be a single html element
So I just have to wrap it all in a div
Tom
@moT01
they are both wrapped in a div no?