Detect compatibility of the new HTML5 tag <mark> with jQuery.

JavascriptProgramming ScriptsWeb DevelopmentFront End Scripts

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;
raja
Published on 10-Apr-2018 11:13:48
Advertisements