I’m working with Javascript/jQuery and I’m trying to figure out what is more advantageous. I want to draw a single line which will be dynamically, according to events, changing its own height, it will have just 1px width and it will be flashing on the site. Should I create just ordinary div with width of 1px or draw a line with some javascript library function?
I’m working with Javascript/jQuery and I’m trying to figure out what is more advantageous.
Share
Using a native element will always be faster than implementing a custom version on your own. Elements are created by the browser’s own executable code while anything you create will be done through its interpreter.