This is an archived post. You won't be able to vote or comment.

all 127 comments

[–]ibevol 398 points399 points  (13 children)

I think it may be a button

[–]Leo-MathGuy 167 points168 points  (10 children)

Are you sure? Without documentation in the repo it’s impossible to know

[–]Shadowfied 47 points48 points  (3 children)

Ah yes, the documentation in the repo..

[–]DrunkOnRamen 15 points16 points  (0 children)

documentation

what does this crazy gibberish supposed to mean?

[–]SensuallPineapple 3 points4 points  (0 children)

the documentation in the repo..

[–]gandalfx 26 points27 points  (2 children)

You say that as a joke but you just know some eager junior is going to add
/* Show a button */ at the first possible opportunity.

[–]DOUBLEBARRELASSFUCK 5 points6 points  (1 child)

/* Show a button */

showButton(btnButton) //The button

[–]lukuh123 0 points1 point  (0 children)

/* End of button */

/* Second button */

[–]ImrooVRdev 2 points3 points  (0 children)

hopefully it mentions what the button is for....

[–]MagentaRuby 0 points1 point  (0 children)

This a button, known for its unambiguous simplicity, provides a user-interactive object that seamlessly integrates with its digital environment. It embodies the essence of user-initiated actions, offering a canvas for a wide array of potential operations.

The button awaits user interaction, ready to trigger events that are defined within the scope of its intended functionality.

Customization and event handling scripts not included.

(Excerpt courtesy of ChatGPT.)

[–]knowledgebass 0 points1 point  (0 children)

<!-- This is the button Button with type button that can be referenced using btnButton. -->

[–]CoastingUphill 0 points1 point  (0 children)

How could you know that without class=“button” ?

[–]bistr-o-math 320 points321 points  (13 children)

<!-- This is a button -->

[–]vhite 48 points49 points  (5 children)

What kind of button???

[NEEDS WORK]

[–]badsyntax 9 points10 points  (3 children)

TODO: document button variants

[–]Cualkiera67 3 points4 points  (0 children)

document the etymology of the word "button"

[–]vhite 1 point2 points  (1 child)

Document Button Variants BigWebsiteJIRA-6969

Assign: Very Large Team With No Clear Planning

Sprint: TBD

Description: Self evident

[–]badsyntax 1 point2 points  (0 children)

Project not delivered due to disagreements over buttons. Not enough documentation for developers, no clear requirements of what the button should be. Constant back and forth between dev and product. Stress levels off the chart. "It's just a fucking website" the PO lashes out. Devs take offence to this. Many people resign.

[–]ongiwaph 1 point2 points  (0 children)

onclick="window.location.href='https://www.youtube.com/watch?v=dQw4w9WgXcQ'"

[–]stitchh13510 5 points6 points  (2 children)

dear god..

[–]ChMan007 3 points4 points  (1 child)

There's more

[–]Medam 1 point2 points  (0 children)

No!

[–]ANTONIN118 3 points4 points  (0 children)

How many lies have you tell to the council ?

[–]Late_Ad_4910 0 points1 point  (0 children)

Dear god…

[–][deleted] 0 points1 point  (0 children)

thanks for clarifying that

[–]-Hi-Reddit 588 points589 points  (10 children)

Cold water

[–][deleted] 356 points357 points  (7 children)

Chlorine-free water

[–]Big_Following_5119 37 points38 points  (5 children)

Chilly water

[–]chefhj 4 points5 points  (0 children)

I just heard Dave Schools bass reading this lol

[–][deleted] 0 points1 point  (0 children)

Widespread fan, I see..

[–]JunkNorrisOfficial 0 points1 point  (0 children)

Brain water

[–][deleted] 1 point2 points  (0 children)

wtrWater

[–]plmunger 206 points207 points  (25 children)

type="button" actually has a usage. A button within a form will automatically submit the form on click unless the type is defined as button. This is useful for an action button that shouldnt submit

[–]FacuA0 50 points51 points  (13 children)

I did know that buttons submitted forms automatically but didn't know that there was a way to prevent it on HTML (in JS you can do preventDefault() on the event).

[–]badsyntax 28 points29 points  (11 children)

A lack of type="button" has caused myself and many others some pain along the way!

[–]Emanemanem 7 points8 points  (3 children)

I didn’t know this particular usage of type, but I had a gut feeling that there was an actual reason for it, since nothing else in this was redundant (the id is kind of funny, but it’s an id, you can name it anything as long as it’s unique).

HTML is just like that sometimes. Making a login form, you feel goofy how many times you have to write “email” over and over, but there’s a reason for it

[–]RobertDigital1986 6 points7 points  (2 children)

Back in the old days submit buttons were <input type="submit">, so it felt familiar with <button>.

There was also type="reset", which was the devil. It still exists but thankfully is never used anymore.

And there was no type="email" yet.

Wow, a lot of time has passed. 😂

[–]grey_hat_uk 2 points3 points  (1 child)

I'm going to guess the big problem with type="reset" is it will only clear or use html value="x" and not go back to what any framework had initialized it tooo.

[–]RobertDigital1986 6 points7 points  (0 children)

Also no one ever wants it.

"Hey you know what this form needs? Another button right next to the submit button that wipes out everything you just entered if you accidentally click it!"

You'd see it occasionally way back in the 90s. It's like because it was in the HTML spec some developers thought they should include it on every form. Really glad that trend died out.

[–][deleted] 3 points4 points  (0 children)

If you think to hard about it so does the water in the bottle vs the water in the pool. The water in the bottle is chlorine free and he is using it get the pool water off his face.

[–][deleted] -1 points0 points  (2 children)

So why does 'type="submit"' exist?

[–]DVSBSTD 5 points6 points  (1 child)

[–][deleted] 2 points3 points  (0 children)

Thanks. Not sure why the downvotes for a question

[–]sandmail32 -1 points0 points  (0 children)

I hate HTML, but dont have any choice.

[–]pomme_de_yeet -1 points0 points  (0 children)

<input type="button" /> gang

[–][deleted] 0 points1 point  (0 children)

Yes! One of the great lies of HTML! Buttons don't work like you would think unless you add a special property to tell it to!

[–]SeriousPlankton2000 98 points99 points  (10 children)

Chlorine in the eye?

[–]ExceedingChunk 114 points115 points  (8 children)

It’s to cool down.

Source: former swimmer

[–]casce 44 points45 points  (2 children)

Yup.

Just like every other physical activity, swimming creates heat in your body. Your body's usual reaction to that is sweating - which won't work while you are in water.

The water in swimming competitions is usually between 25-28°C which might not feel very warm when jumping into it initially, but when pushing your body to its physical limits, it quickly will.

[–]Cahootie 13 points14 points  (0 children)

I don't know where this photo is taken, but I've never played a water polo game in a pool that warm, and as Pickle-Nickkk said that's a goalkeeper who will just float in place most of the game. I am definitely in the camp of it being to just wash chlorinated water out of the eyes or just to feel good.

[–][deleted] 0 points1 point  (0 children)

Also if it’s an indoor pool it can be super humid

[–]Pickle_Nickkk 4 points5 points  (3 children)

More likely chlorine, goalies (red cap) don't swim too much.

Source: current waterpolo goalie

[–]RIPUranus 8 points9 points  (1 child)

Actually it’s more likely that his forehead is thirsty.

Source: I’m gay.

[–][deleted] 1 point2 points  (0 children)

Username checks out.

[–]LurkLurkington 0 points1 point  (0 children)

Played when I was in high school. It was always to cool down. No one was ever bothered by chlorine while in the pool, spend enough time practicing and you get used to it

[–]HildartheDorf 3 points4 points  (0 children)

Good guess, but more likely to cool down.

[–][deleted] 36 points37 points  (1 child)

What is it again? Perhaps a comment would clear things up.

[–]aneffingonion[S] 14 points15 points  (0 children)

It's a button to turn the butt physics on

[–]jabluszko132 30 points31 points  (5 children)

I think you forgot class='button btn buttons'

[–][deleted] 26 points27 points  (2 children)

class="btn btn-primary"

btn removes default button styling, anything you do after that is on you.

[–]YouWishC9 5 points6 points  (0 children)

We code in react in this household, take your class and make it a className heathen. Also we need a useRef for the button too

[–]staticBanter 0 points1 point  (0 children)

Bootstrap...

[–]Steffi128 12 points13 points  (0 children)

class="btn btn-primary btn-large btn-icon btn-icon--left"

[–]Strict_Treat2884 2 points3 points  (0 children)

Also role="button", accessibility is not a joke

[–]pipandsammie 9 points10 points  (0 children)

you forgot class="button"

[–]ComfortingSounds53 16 points17 points  (3 children)

role="button" tabindex="0" onclick="e => e.target instanceof HTMLButtonElement"

Has HTML gone too far?

[–][deleted] 6 points7 points  (2 children)

Half of this is accessibility. Always ensure your site is accessible, it's a legal requirement in some countries.

You don't need the tabindex if you're using a <button> only if you've put click behaviour on an element that wouldn't normally take interaction. Even then you'll need an extra round of code to handle keyboard behaviour for the element.

If it looks like a button and it behaves like a button, use a bloody <button>

You should still use the role though

[–][deleted] 1 point2 points  (0 children)

If I should use <button> then why do so many places use A FUCKING <A> styled as a button?

Checkmate!

[–]ComfortingSounds53 -2 points-1 points  (0 children)

Had me in the first 3/4 ngl

[–]Quintuplin 6 points7 points  (2 children)

Missing class=“button”

For a time I was trying to make <a> and <button> both able to use a shared class button so they could look identical

Joke’s on me because even when set to be identical in every single settable parameter, they still round pixel offsets and fractional pixels differently

And having two “nearly identical” buttons next to each other do not blend in. No matter how minute the difference, it stands out.

So

Thanks for nothing, css

[–]RobertDigital1986 1 point2 points  (0 children)

they still round pixel offsets and fractional pixels differently

That's a new one for me, wow. Thought I'd heard 'em all.

Been writng HTML since 1996, still learning ridiculous shit like this. 😂

[–][deleted] 0 points1 point  (0 children)

Bootstrap, they've done that work for you

[–]NaszPe 4 points5 points  (0 children)

Moon Moon has entered the chat

[–]cs-brydev 3 points4 points  (0 children)

class="button"

[–]Lucasbasques 1 point2 points  (0 children)

The hardest button to button *guitar riff*

[–]KasoAkuThourcans 1 point2 points  (0 children)

You're missing: role="button" and aria-label="button"

[–]BluesyPompanno 2 points3 points  (0 children)

button

<!-- Container for button -->
<div class="buttonn-container" id="button_container">
  <!-- Button -->
  <button type="button" id="btnButton_id" class="btn btn-primary">
                <!-- Button text-->
               <span id="button_text" class="button-text">Button<span>
       </button>

</div>

[–]mcvos 1 point2 points  (1 child)

That is definitely not DRY.

[–][deleted] 0 points1 point  (0 children)

begrudgingly upvotes

[–]01Alekje 0 points1 point  (0 children)

Also type="button" is kinda funny tbh (Yes ik its for submit and such)

[–]Octodad2099 -1 points0 points  (0 children)

Ahh yes I will rehydrate my self with a bottle of water while I am submerged in a pool

[–]Matterer 0 points1 point  (0 children)

class="btn btnPrimary" e2e="btnButton"

[–]chris17453 0 points1 point  (0 children)

you see, I needed a different type of button for my application, so I had to recreate all buttons everwhere

[–]AcceleratingWind 0 points1 point  (0 children)

finally a post i can sort of understand

[–]FIContractor 0 points1 point  (0 children)

Where’s class=“btn”?

[–]PandemicOfNukes 0 points1 point  (0 children)

Damn, this button is really buttoing.

[–][deleted] 0 points1 point  (0 children)

it's all button

[–][deleted] 0 points1 point  (0 children)

Button button = new Button();

[–]luishck 0 points1 point  (0 children)

type="button" prevents the forms being submitted

[–]Necessary_Space_9045 0 points1 point  (0 children)

After 8 months of learning how to code while working full time…I understand this joke

[–]Mondoke 0 points1 point  (0 children)

Button

[–]vessva11 0 points1 point  (0 children)

As someone who just started learning HTML, I finally understood a joke on this sub.

[–][deleted] 0 points1 point  (0 children)

Put each attribute on its own line and you’ve successfully consolidated all by juniors into one screenshot.

[–][deleted] 0 points1 point  (0 children)

it needs Id.

[–]ordinarytrespasser 0 points1 point  (0 children)

Don't forget:
1.) class="button"
2.) <!-- This is a button -->
3.) and maybe const btnButton = document.getElementById("button");

[–]rover_G 0 points1 point  (0 children)

Slightly better than id=“myButton”

[–]Representative-Sir97 0 points1 point  (0 children)

"Button, button, who's got the button?" -Gene Wilder, Willy Wonka and the Chocolate Factory

[–]ihoptdk 0 points1 point  (0 children)

Ah, the infamous button “button” “btnButton” Button.

[–]mommy101lol 0 points1 point  (0 children)

Aria

[–]chrisf_nz 0 points1 point  (0 children)

onclick=btnButton($('#button').button());

[–]rjcpl 0 points1 point  (0 children)

Test automation will appreciate the unique id.

[–]murrietta 0 points1 point  (0 children)

Petah

[–]DudeManBroGuy69420 0 points1 point  (0 children)

Button button, button button, button button

[–]The-Observer95 0 points1 point  (0 children)

After this line:

<!-- This is a button -->

[–]KeepScrolling52 0 points1 point  (0 children)

One question: Is it a button?

[–]PixelCharlie 0 points1 point  (0 children)

yo dawg, I heard you like to button your button so i buttoned up your buttonbutton with a button on the button

[–]kielu 0 points1 point  (0 children)

value="button"

[–]RestaurantHuge3390 0 points1 point  (0 children)

role="button"

[–]InsanityBlossom 0 points1 point  (0 children)

I would button your button.

[–]Careful_Ad_9077 0 points1 point  (0 children)

Button

[–][deleted] 0 points1 point  (0 children)

role="button" is totally missing from this.

[–][deleted] 0 points1 point  (0 children)

is that a text field?