Skip to content

Commit 53d3ba2

Browse files
Bartlomiejszhostep
authored andcommitted
Backport of PR-5028 for Magento 2.1: Load jquery using requirejs to print page
(cherry picked from commit 702a6d6)
1 parent 918dd05 commit 53d3ba2

File tree

1 file changed

+10
-3
lines changed
  • app/code/Magento/Theme/view/frontend/templates/html

1 file changed

+10
-3
lines changed

app/code/Magento/Theme/view/frontend/templates/html/print.phtml

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,14 @@
55
*/
66
?>
77
<script>
8-
jQuery(function() {
9-
window.print();
10-
});
8+
require(
9+
[
10+
'jquery'
11+
],
12+
function($) {
13+
$(function() {
14+
window.print();
15+
});
16+
}
17+
);
1118
</script>

0 commit comments

Comments
 (0)