Frontend Development

I want to learn more.....

Submitted by WOLFLEAKS, , Thread ID: 121162

Thread Closed

RE: I want to learn more.....

#5
20-02-2019, 01:37 AM
Coxison Wrote:
Shoot over your discord and we could possibly work on some projects. I can give you some suggestions and pointers. Although there's one I'd like to say publically - look into jQuery too.

I would recommend against jQuery, 90% of what is in jQuery can now be done in Javascript. Sure there are some shortcuts, but most people add jQuery to toggle some classes or whatever. See the following example;

Code:
$("#menu-toggle").click(function(e){
  e.preventDefault();
  $("#wrapper").toggleClass("toggled");
});

This can be replaced by the following


Code:
document.getElementById("menu-toggle").addEventListener("click", function(e) {
  document.getElementById("wrapper").classList.toggle("toggled");
});


As you can see jQuery in this example is slightly shorter, but in reality, it's not worth including a whole library just for that.

Learn Javascript as Javascript if you do, don't learn a library thinking you know the language.
,,`,,,,`, Software Engineer ,,`,,,,`,

Users browsing this thread: 2 Guest(s)