That way I could listen for that event and do any minor things not covered by the library? Basically I want to be able to initialise a jQuery plugin on the newly append elements that have come back from the server. I could use jQuery livequery but everyone frowns on that :)
I was also playing around with the idea of the server being able to send back multiple fragments, each fragment consisting of a command, html and a selector. Would add some pretty cool scenarios for example not having to use refresh:
In C# on the server it would look something like this:
/* JUST thinking out loud here
// append
// replace
// remove (just send the selector)
// refresh (send a url for the ui to requery)
// we could return fragments like this:
return Json(new
{
fragments = new [] {
new {
command = "append",
selector = ".result-list",
html = "<p>Take out the trash</p>"
},
new {
command = "replace",
selector = ".task-counter",
html = "<span class='count'>5</span>"
}
}
});
*/
Hi just wondering if you'd be keen to add a custom event that fires at the end of the processData method.
Something like this
That way I could listen for that event and do any minor things not covered by the library? Basically I want to be able to initialise a jQuery plugin on the newly append elements that have come back from the server. I could use jQuery livequery but everyone frowns on that :)
This is the listener:
I was also playing around with the idea of the server being able to send back multiple fragments, each fragment consisting of a command, html and a selector. Would add some pretty cool scenarios for example not having to use refresh:
In C# on the server it would look something like this: