Guest User

wrong javascript code?

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