I have the following HTML in a page:
<a href="javascript:void(0)" class="move-next"><img src="/Content/images/small-next-arrow.png" height="16" width="16" alt="Next status arrow" title="Progress to next status"/></a></div>
and I have the following javascript that attempts to handle the click event:
function InitProgressionSelectors() {
$(".move-next").click(function() {
moveNext(this);
});
$(".move-previous").click(function() {
movePrevious(this);
});
}
function moveNext(target) {
var sourceContainer = target.parent("td");
var targetContainer = sourceContainer.next("td");
}
I'm obviously missing something, because "target" in the moveNext function is returning an HTMLAnchorElement, but when I try to wrap that, or access it somehow as a jQuery object, so I can try to get a handle to it's parent container, I get errors.
A reference to $(target) returns null. How do I get a reference to target as a jQuery object so I can work with it in that context? What am I missing?
Thanks.