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
Tom
@moT01
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?
Justin25
@Justin25
I have to wrap them in a div inside the variable element
It can't hold multiple html elements
Tom
@moT01
give it a try
i think it's the +, something doesn't feel right there
Justin25
@Justin25
It works fine if I put the <p> elements in a div
linkin-park
@linkin-park
i have no clue why i use overflow:hidden but it works like charm on using float :)
korzo
@korzo
@linkin-park It's oldschool clearfix, but doesn't work well on mobile
linkin-park
@linkin-park
i see :(
what do you guys do for that ? @korzo
korzo
@korzo
@linkin-park
:after {
  content: "";
  display: table;
  clear: both;
}
on wrapper element containing floats
linkin-park
@linkin-park
nice :)
Marius Nicolae
@bytao7mao
somebody here with python experience ?
cand somebody help me debugging this
linkin-park
@linkin-park
@korzo can you tell me what this snippet actually fix
Marius Nicolae
@bytao7mao
Screenshot from 2017-09-23 17-14-25.png
linkin-park
@linkin-park
@korzo /do
korzo
@korzo
@linkin-park floated elements are not part of the document flow. It's the same as position:absolute.
This snippet will visually put them back to the document flow.
Long story short, wrapper will have with and height of containing floated elements
Dušan Todorović
@krckyboy
Hey there, guys. What is better for you, personally - mobile first or the wide screen first approach? What works the best for you and why?
korzo
@korzo
linkin-park
@linkin-park
my question sir : why not display:block ?
why we have content and clear ?
was hoping something like overflow:hihdden :/
clear to clear floats but why content ?
korzo
@korzo
@linkin-park pseudo elements need content otherwise they are not displayed
Ken Haduch
@khaduch
@krckyboy - I like mobile first, because mobile usage is so common and if you have a page that doesn't present well on mobile, the user (viewer) might not get too far using your page. Bootstrap's is built on a 'mobile first' philosophy. I just googled for the term, and this page, while being bootstrap-centric, makes good points about the mobile-first approach.