If you want to find the wrapping DIV element (regardless of the ID on that DIV) then you’ll want this jQuery selector:


$("#searchBox").closest("div");

jQUery.com – Get the first ancestor element that matches the selector, beginning at the current element and progressing up through the DOM tree.


$('li.item-a').closest('ul').css('background-color', 'red');