It is not priority, but execution order. Javascript is not involved in any sort of prioritising or doesn't have anything like specificity in CSS to even have a need for it.
Javascript code is executed in the order it is included in the HTML document irrespective of whether it is inline or external js, although events
makes things a bit more complicated, we can schedule code to be run later on certain events like 'load' event of window
. So it is easy to make sure your code is run after theirs, but if they are say changing style from onload
event handler, then you have to add your code to the same event
itself. (Order of event handlers are ensured in DOM3 at least in specification)
But, have you tried !important
in CSS, it can override inline styles and comes handy in some scenarios like this. But if you are able to remove the styles using JavaScript well and good.