Active
Project:
Views Flag Refresh
Version:
6.x-1.0-beta3
Component:
Miscellaneous
Priority:
Minor
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
26 Jul 2011 at 15:52 UTC
Updated:
26 Jul 2011 at 15:52 UTC
In my script I have some custom js that needs to be refreshed after the views_flag_refresh completed. Looking through the code, it wasn't clear to me how to do this with the module itself.
I found a solution in jQuery.ajaxComplete. My view is a block.
// re-add our custom js on completion
$('#block .content').ajaxComplete(function(event, request, settings){
// only update on the refresh GET, not the initial POST
if(settings.type == "GET"){
alerts_init(); // my custom function for refreshing the js
}
});
Is there a 'correct' way to accomplish this with this module?
Module devs: How does this solution look to you?
Any comments appreciated.
Thanks.