Skip to content

Commit

Permalink
wait for DOM to remove attribute
Browse files Browse the repository at this point in the history
use window.jQuery instead of $
updated to removeAttr method
  • Loading branch information
Jeffrey Guo committed Sep 8, 2014
1 parent 6e13a68 commit cfbf61f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/SilverStripe/BehatExtension/Context/BasicContext.php
Expand Up @@ -115,8 +115,8 @@ public function readErrorHandlerAfterStep(StepEvent $event)

$javascript = <<<JS
if ('undefined' !== typeof window.jQuery) {
$(document).ready(function() {
window.jQuery('body').removeAttribute('data-jserrors');
window.jQuery(document).ready(function() {
window.jQuery('body').removeAttr('data-jserrors');
});
}
JS;
Expand Down

0 comments on commit cfbf61f

Please sign in to comment.