summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/jetpack/modules/shortcodes/js/recipes.js')
-rw-r--r--plugins/jetpack/modules/shortcodes/js/recipes.js16
1 files changed, 16 insertions, 0 deletions
diff --git a/plugins/jetpack/modules/shortcodes/js/recipes.js b/plugins/jetpack/modules/shortcodes/js/recipes.js
new file mode 100644
index 00000000..37215b4a
--- /dev/null
+++ b/plugins/jetpack/modules/shortcodes/js/recipes.js
@@ -0,0 +1,16 @@
+/* global jetpack_recipes_vars */
+( function( $ ) {
+ $( window ).load( function() {
+ $( '.jetpack-recipe-print a' ).click( function( event ) {
+ event.preventDefault();
+
+ // Print the DIV.
+ $( this )
+ .closest( '.jetpack-recipe' )
+ .printThis( {
+ pageTitle: jetpack_recipes_vars.pageTitle,
+ loadCSS: jetpack_recipes_vars.loadCSS,
+ } );
+ } );
+ } );
+} )( jQuery );