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
Evan W
@Dirtier
@alhazen1 You see what I'm talking about?
d wilder
@alhazen1
@Dirtier I have seen at least one that searches with every key event kind of in the way google search make search suggestions. It was a bit much
Evan W
@Dirtier
@alhazen1 Haha that would be awesome, but yea all I really care about is that they're able to search whether theyre on a phone or not and without a submit button
I mean if theres some other way to do it I'm all ears
d wilder
@alhazen1
@alhazen1 I would put some type of search button or icon as it is more intuitive and would work on any device
Evan W
@Dirtier
Hmm ok. Is there anyway I can just make hitting enter trigger that button?
use a .bind or something
Thats what I did before, I just hit the button element so they wouldnt see it anyway
Greg Duncan
@GregatGit
@Dirtier you shouldn't name your functions or varibles 'ready' -
Evan W
@Dirtier
But then yet again, I didn't know the key id on mobiles
@GregatGit It is the ready function
Thats why its named that. I know
Greg Duncan
@GregatGit
??
Evan W
@Dirtier
@GregatGit Scroll all the way down, you'll see what I'm talking about
@GregatGit const ready = () => { IS the ready function, the it's called at the very bottom.
then*
Greg Duncan
@GregatGit
so what does your ready function do?
Evan W
@Dirtier
?
d wilder
@alhazen1
@Dirtier capture enter key event and have that fire off your 'submit' code. But that still leaves you with nothing on a phone / tablet
Evan W
@Dirtier
you dont know what $(document).ready() is?
@alhazen1 Yea thats what I was doing before. Blahhhhh.
AliFox15
@AliFox15
It's jQuery startup..I think
Evan W
@Dirtier
@GregatGit my ready function is another way of encapsulating the entire thing in $(document).ready(function(){ })
d wilder
@alhazen1
@Dirtier You could have button / icon button that is hidden at large screen but shown at tablet- sizes
AliFox15
@AliFox15
I added the class,and writed the .picture-center,why the picture does not align center
Evan W
@Dirtier
so at the bottom of the screen it says $(document).ready(ready) ---> works the exact same way, but much easier to read.
@alhazen1 Ooooo true, true. I would still rather have them just be able to hit enter like you do when searching anywhere else.
But I guess I'll just do what you said until I find out how to do that
@alhazen1 thanks for the help
CamperBot
@camperbot
dirtier sends brownie points to @alhazen1 :sparkles: :thumbsup: :sparkles:
:cookie: 394 | @alhazen1 |http://www.freecodecamp.com/alhazen1
d wilder
@alhazen1
@AliFox15 Maybe you didn't save yet. All I see is an empty html skeleton
Greg Duncan
@GregatGit
@Dirtier sorry - I was giving you a tip (my opinion really) give your functions very distinct names and that make it clear what they are doing
AliFox15
@AliFox15
Sorry@alhazen1 ,Now it's saved
@alhazen1
d wilder
@alhazen1
@GregatGit I agree that having functions with same name could lead to some serious conflicts
Evan W
@Dirtier
@GregatGit Haha yea I feel you. Most people who do it this way name it ready though, bc that really is the clearest description there is I think lol
I mean what do you think of when you read a function named ready lol
There really is an advantage to doing it like that, it cuts load times down by a ton by only putting essential stuff inside the ready function, and having it call functions outside of it that are can be loaded as they are needed
AliFox15
@AliFox15
Is it in the center of the page now?
d wilder
@alhazen1
@AliFox15 If you use text-center you will need to apply it to every div you want centered. Put that class in the div wrapping the image
<div class="text-center"><img class="picture-center" src="https://c2.staticflickr.com/4/3689/10613180113_fdf7bcd316_b.jpg"/></div>
Evan W
@Dirtier
@alhazen1 Here's my working version, but again, it only works on computers.
And sometimes when you hit enter it doesn't even show the wiki, other times it does. No idea why. I'm not getting any console errors from the API or anything
The enter key wont even register when you use it inside this little window in the chat room =S
There has to be an easier way to do this
Is there anyway to make a form submit action just pass along the value of the text input to a function?
I cant think of a way to write that in html
AliFox15
@AliFox15
@Dirtier Center it in body element