I was trying to get the CSS rules for an HTML element.
I already found an answer here: Can jQuery get all CSS styles associated with an element?
The problem is that the given answer doesen't work, as it is stated in the comments; it gives me Uncaught Error: Syntax error, unrecognized expression: button.ui-button::-moz-focus-inner
The problem in that code is that it is passing every CSS rule selector to the jquery.is()
method, that is probably unable to recognise 'every
' CSS selector that can be written, so it gives an error on complicated rules.
I've searched around and looked at the standard but I'm running out of ideas.
There is another answer that gives the computed style, that is what I am using currently, but that is giving me so many useless properties that are damaging my result.
Any help appreciated!