JSFiddle - React, Tailwind, and code Playground

by mgibsonbr

HTML

<span style="position:fixed;">a</span>
<span style="position: fixed;">b</span>
<span class="myclass">c</span>

CSS

.myclass {
    position:fixed;
}

JavaScript

var first = $('[style*="fixed"]');
var second = $('*').filter(function(){ return this.style && this.style.position === 'fixed' });
var third = $('*').filter(function(){
    return $(this).css("position") === 'fixed'
});

alert([first.length, second.length, third.length]);