Advertisement
towfiqi

upsell.js

Apr 25th, 2016
113
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.94 KB | None | 0 0
  1. /**
  2. * Upsell notice for theme
  3. */
  4. jQuery(window).bind("load", function() {
  5.  
  6. // Add Upgrade Message
  7. if ('undefined' !== typeof tarL10n) {
  8. upsell = jQuery('<a class="tar-upsell-link"></a>')
  9. .attr('href', tarL10n.tarURL)
  10. .attr('target', '_blank')
  11. .text(tarL10n.tarLabel)
  12. .css({
  13. 'display' : 'inline-block',
  14. 'background-color' : 'rgb(222, 49, 21)',
  15. 'color' : '#fff',
  16. 'text-transform' : 'uppercase',
  17. 'margin-top' : '6px',
  18. 'padding' : '3px 6px',
  19. 'font-size': '10px',
  20. 'letter-spacing': '1px',
  21. 'line-height': '1.5',
  22. 'clear' : 'both',
  23. 'font-weight' : 'bold',
  24. }) ;
  25.  
  26. //appending upgrade to PRO fields
  27. jQuery('#accordion-section-themes h3').append(upsell);
  28.  
  29. //Second CTA background
  30. //remove fields
  31. jQuery('#customize-control-second_cta_bg_image_upgrade input').css( 'display' , 'none');
  32.  
  33. //Upgrade append
  34. jQuery('#customize-control-second_cta_bg_image_upgrade').append(upsell);
  35.  
  36.  
  37. //Front page text section
  38. //remove fields
  39. jQuery('#customize-control-optin_background_image_control input').css( 'display' , 'none');
  40.  
  41. //Upgrade append
  42. jQuery('#customize-control-optin_background_image_control').append(upsell);
  43.  
  44.  
  45. //Blog more option
  46. //remove fields
  47. jQuery('#customize-control-blog_more_option_control input').css( 'display' , 'none');
  48.  
  49.  
  50. //Upgrade append
  51. jQuery('#customize-control-blog_more_option_control input').append(upsell);
  52.  
  53.  
  54.  
  55. //Footer background image
  56. //remove fields
  57. jQuery('#customize-control-footer_bg_image_control input').css( 'display' , 'none');
  58.  
  59. //Upgrade append
  60. jQuery('#customize-control-footer_bg_image_control .description').append(upsell);
  61.  
  62. //Page & Post Section
  63. //remove fields
  64. jQuery('#customize-control-error_head_text_color_control input').css( 'display' , 'none');
  65.  
  66. //Upgrade append
  67. jQuery('#accordion-section-error_page h3').append(upsell);
  68.  
  69.  
  70. // Remove accordion click event
  71. jQuery('.tar-upsell-link').on('click', function(e) {
  72. e.stopPropagation();
  73. });
  74. }
  75. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement