0
I am creating a website and so I can maintain a greater control and save time of having to change tab all the time I am applying the properties direct by javascript, I would like to know this influences something insira o código aqui
$("#test"). css("border-style","Solid"). css("background-color","Transparent")
. css("height","100%");
$("h1").css("display", "inline-block");
$("#teste1").css("background-color","blue")
.css("height","50px");
$("#teste2").css("background-color","green")
.css("height","50px");
$(".navbar-header").css("background-color","transparent")
It will make it difficult to maintain your application, as well as assign a responsibility to Javascript that is not Javascript. Using something for something it wasn’t designed for is the best definition of "gambiarra"
– mau humor
As stated above, maintenance will be problematic. When you need to make some adjustments furutamente, see the strength of the
Ctrl+Tab
.– relaxeaza
There is no such thing as good/bad practice, this term was invented a few years ago in IT as a way to decouple when you do not know how to explain something, but want to give the impression that you know the subject, especially with those who are not in the area or have no experience. The fact is that using JS for something you don’t need is always problematic. You have unnecessary processing, inconsistency depending on what kind of proxy/firewall you find along the way, and you’re using the wrong layer for the task. If it’s a dynamic thing, it’s justifiable to do it in one-off situations, but only if you don’t have a more obvious native way.
– Bacco
You could ask the question ([Edit]) some examples of how you are applying javascript?
– rray