It looks like JQuery does the search in the current document when using a selector.
JQuery
document
How to search for an element only inside a div
div
jQuery provides several ways to search for specific elements:
$("#your_div").find(".your_things"); //Find everything inside //-or- $("#your_div").filter(".your_things"); //Find only the top level //-or- $("#your_div .your_things"); //Easiest