I am trying to achieve the following in vanila javascript
$('#myElement').next('a').length > 0
I'm currently at this stage
document.getElementById('myElement').nextSibling.length > 0
But I need to specifically check if the attached <a> tag exists with the .item class after #myDiv , since it may not be one, and I need to apply a specific style to #myDiv in each case.
javascript jquery
Ilja
source share