Created
May 13, 2015 15:07
-
-
Save devinsays/6841f6253fa47a3f6c29 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* 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