jquery - location.reload() in site's frontend is interferring with site's admin backend -


here's code:

// reload screen after submission , completion of ajax actions $('.view-whiteboard, .view-whiteboard-full').ajaxstop(function() {   location.reload(); }); 

i have code operating in frontend of drupal website reason when submit/save in backend admin panel above snippet of code makes page reload.

i'm confused why it's doing since have defined class names in code should specific forms in frontend.

am missing in above code that's making i'm triggering location.reload() on every form submission?

any great. thanks--

as of jquery 1.8, .ajaxstop() method should attached document. can around creating .click function runs ajaxstop once:

$(document).ready(function(){     $(".view-whiteboard, .view-whiteboard-full").click(function(){         $(document).one("ajaxstop", function() {             location.reload();         });     }); }); 

otherwise, separate public vs admin theme don't use same javascript (must disable overlay module).


Comments

Popular posts from this blog

Why does Ruby on Rails generate add a blank line to the end of a file? -

keyboard - Smiles and long press feature in Android -

node.js - Bad Request - node js ajax post -