Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@devinsays
Created May 13, 2015 15:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save devinsays/6841f6253fa47a3f6c29 to your computer and use it in GitHub Desktop.
Save devinsays/6841f6253fa47a3f6c29 to your computer and use it in GitHub Desktop.
/**
* Upsell notice for theme
*/
( function( $ ) {
// Add Upgrade Message
if ('undefined' !== typeof prefixL10n) {
upsell = $('<a class="prefix-upsell-link"></a>')
.attr('href', prefixL10n.prefixURL)
.attr('target', '_blank')
.text(prefixL10n.prefixLabel)
.css({
'display' : 'inline-block',
'background-color' : '#2EA2CC',
'color' : '#fff',
'text-transform' : 'uppercase',
'margin-top' : '6px',
'padding' : '3px 6px',
'font-size': '9px',
'letter-spacing': '1px',
'line-height': '1.5',
'clear' : 'both'
})
;
setTimeout(function () {
$('#accordion-section-themes h3').append(upsell);
}, 200);
// Remove accordion click event
$('.prefix-upsell-link').on('click', function(e) {
e.stopPropagation();
});
}
} )( jQuery );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment