JSFiddle - React, Tailwind, and code Playground
HTML
<div style="display:none"><p><span id="myElement">test</span></p></div>
JavaScript
$.expr[':'].css = function(obj, index, meta, stack) {
var args = meta[3].split(/\s*,\s*/);
return $(obj).css(args[0]) == args[1];
}
// Then we can use our custom selector, like so:
$("#myElement").parents(":css(display,none)").show('slow').hide('slow').show('slow');