JSFiddle - React, Tailwind, and code Playground
HTML
<ul>
<li>11</li>
<li>12</li>
<li class="a" id="x">13</li>
<li>14</li>
<li class="a">15</li>
<li>16</li>
</ul>
JavaScript
const startElem = document.getElementById('x');
// jQuery fill background with yellow
$(startElem).siblings().css('background', 'yellow');
// vanilla js add outline
myGetSiblings(startElem).forEach(el =>
el.style.outline = 'dashed 1px gray'
);
function myGetSiblings(startElem) {
return Array.from(startElem.parentNode.children)
.filter(el => el !== startElem);
}