我试图弄清楚单击它时如何将新更改返回或应用回html。
看看“TODO”评论。我可以在 $(o1) 上看到新的值变化,但是如何将它冒泡到具有“this”值的点击调用者?
var fooMouseClick = function(parmThis)
{
var $HtmlSpans = $(parmThis.parentElement.innerHtml);
$.each($HtmlSpans, function(i1, o1) {
if ($(o1).attr('data-column-sort-ordering') == "") {
$(o1).attr('data-column-sort-ordering', 'ASC');
//TODO - How to apply this new "$(o1)" changes to parmThis so the parent script caller can be updated.
}
});
}
var foo2 = function()
{
$('#Box1 li[title="Model"] span.SpanRight-SortOrdering').click(function() {
fooMouseClick(this);
});
}