I have a nested listview containing multiple rows that each contain a ddl and a textbox, E.G.:
<ItemTemplate>
<tr>
<td>
<asp:DropDownList id="myDDL" runat="server" CssClass="aDDL"
onfocus="javaScript:$(function() {
$(<selector>).siblings.RemoveClass('wrappedElement');
$(<selector>).addClass('wrappedElement');
})" /></td>
<td><asp:TextBox id="myTextBox" runat="server" CssClass="aTextBox"
onfocus="javaScript:$(function() {
$(<selector>).siblings.RemoveClass('wrappedElement');
$(<selector>).addClass('wrappedElement');
})" /></td>
</tr>
</ItemTemplate>
What I want to do is wrap the element that was clicked on. What is happening is that I am wrapping all "aDDL" or "aTextBox" elements. I need to find the selector for the element that was just focused on.
I tried this article, but "this" or $(this) winds up pointing to the entire document.