How can I detect compatibility of the new HTML5 tag <mark> with jQuery? I want to check the compatibility of <mark> tag.
Use the following to check the compatibility of the HTML5 tag <mark>:
var $myEL = $('<mark>'); $myEL.appendTo('body'); var bgColor = $myEL.css('backgroundColor'); if (/rgb\(255\, 255\, 0\)/.test(bgColor)) return true; else return false;
We use cookies to provide and improve our services. By using our site, you consent to our Cookies Policy. Accept Learn more