Ok, question does not really make sense. Here is the situation. I have legacy code using "Anthem" ajax, and Anthem allows to hook into pre and post callback steps. So if I have code like this, how do I execute code under .each block in cmdSave_PostCallBack. I know I cannot call it the way it is, but what would be a way that would allow this block to be executed when doc is loaded and also in the postcallback function?
jQuery(document).ready(function() {
//select all anchors in divMain element and attach click handler
$("#<%=divSelectorLinks.ClientID %> a").click(function(e) {
e.preventDefault();
var content = $(this.getAttribute("rel"));
//attach nyromodal
$.nyroModalManual({
bgColor: '#efefef',
width: 200,
content: content
})
})
//display currently selected value
.each(function(i) {
var selectionText = $(this.getAttribute("rel")).find(':selected')[0].innerHTML;
if (selectionText.substr(0, 4) == "All ") {
this.innerHTML += ": All";
}
else {
this.innerHTML = this.innerHTML + ": " + selectionText;
}
});
return false;
});
function cmdSave_PostCallBack() {
}