CodeHQ

Posts Tagged ‘elements’

|

Find elements on page by their CSS Properties

Tuesday, February 12th, 2019

Drop this in to your console in dev tools and all elements with position: absolute will render with a border.

var absElements = [];
$("*").css("position", function(i, pos){
   if(pos==="absolute") absElements.push(this);
});

$(absElements).css({border:"5px solid red"});

Tags: , , , , , , ,
Posted in CSS, jQuery | No Comments »