First thing

  • FTB will be shutting down this forum by the end of July. To participate in our community discussions, please join our Discord! https://ftb.team/discord

lenscas

Over-Achiever
Jul 31, 2013
2,015
1,801
248
Then at least also combine it with jquery.
Unlike you like to write
var element=document.getElementById("SomeIdHere")
instead of
var element=$("#someIdHere")
it also makes other stuff a lot easier
 
  • Like
Reactions: erindalc

lenscas

Over-Achiever
Jul 31, 2013
2,015
1,801
248
the $() thing also accepts other things then just strings

var element=$("#someIdHere)
var someOtherElement= $(element).find(".someClassHere")
$(someOtherElement).html("<p>It has now a p element inside of it</p>")
however that piece of code could also have been written like
$("#someIdHere").find(".someClassHere").html("<p>It has now a p element inside of it</p>")