function defaultSelected() { var curr = $("#leftTree li[onclick*='" + $("#content_iframe").attr("src") + "']"); if (curr.size() > 0) { $(curr[0]).addClass("selected"); $("#leftTree li:not([onclick*='" + $("#content_iframe").attr("src") + "'])").removeClass("selected"); } }