Advertisement
Guest User

Untitled

a guest
Oct 17th, 2016
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 5 1.31 KB | None | 0 0
  1.  
  2.         <script src="//code.jquery.com/jquery-1.10.2.min.js"></script>
  3.         <script src="//dta8vnpq1ae34.cloudfront.net/javascripts/jquery-ui-1.10.4.custom.min.js"></script>
  4.         <script src="//dta8vnpq1ae34.cloudfront.net/javascripts/pitchprint.min.js"></script>
  5. <script>
  6.     var designer;
  7.     function on_ready_function() {
  8.         $("#customize_now_button").removeAttr('disabled');
  9.         $("#customize_now_button").click(function() {
  10.             designer.show();
  11.         });
  12.     }
  13.     function on_saved_function(_fromDesigner) {
  14.         designer.unload();
  15.         console.log(_fromDesigner);
  16.     }
  17.     function initializeEditor() {
  18.         $("customize_now_button").attr('disabled', 'disabled');
  19.         designer = new W2P.designer({
  20.             //set the customize now button to disabled untill the designer is ready...
  21.             apiKey: "0611d2263c6396d78ee016446d91cee6",
  22.             globalUrlPrefix: "https://pitchprint.net/app/",
  23.             designId: "2835067ec048692279e9d09de1327153",
  24.             autoInitialize: true,
  25.             product: {id:'PID_12', title:'Sample Business Card'},
  26.             mode: "new",
  27.             onReady: on_ready_function,
  28.             onSave: on_saved_function
  29.         });
  30.     }
  31.  
  32.     $(document).ready(function () {
  33.         initializeEditor();
  34.     });
  35. </script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement