Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
The moment you see jQuery on a website in 2020, you already know it's age-old legacy, or stupid moron shit. Or even both at the same time.
-
@c3r38r170 been a long time since I've played with jQuery but unless I'm mistaken the function copies the value from an input to another (visible to hidden).
IMHO, from the most offensive to the least:
* The global line 2
* The fact that first input value should be obtained from the event and therefore from the function argument, dropping line 3 altogether.
* getting the second input's id instead of the input itself, allowing to chain with a set and dropping line 4 as well.
Thoughts? -
It is false to believe “professional == good”. At most I will give you is “professional == paid” but even that is iffy now.
-
@Commodore Thank you so so much for the carbon.now.sh link. (Although I wouldn't reproduce this specific code piece myself in order to share it.)
Hey, senior developers, is there a reason for this?
I just can't believe it.
The line that makes me wanna kill is the
$("#" + id).val(val);
Taken from a very profesional site.
rant
unnecessary jquery
javascript