Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Html code
- -------------
- <div class="newslater_label fix">
- <input name="_mc4wp_action[]" type="checkbox" value="subscribe" checked><span>General Subscription</span>
- </div>
- CSS code
- -----------
- .newslater_label.fix input[type="checkbox"] {
- opacity: 0;
- }
- .activecheck_bill {
- position: relative;
- }
- .cusize_check_billing {
- display: inline-block;
- width: 19px;
- height: 19px;
- background: #fff;
- border: 1px solid #c2c2c2;
- position: relative;
- float: left;
- margin-right: 10px;
- }
- activecheck_bill:before {
- content: "";
- position: absolute;
- top: 0px;
- left: 0;
- background: url(http://www.powerbanners.co.uk/wp-content/themes/power-banner/img/tick_checkbill.png) no-repeat scroll 3px 4px;
- width: 19px;
- height: 19px;
- }
- Jquery code
- ----------------------------
- jQuery('.newslater_label input').wrap('<div class="cusize_check_billing fix"></div>');
- jQuery('.newslater_label input').click(function(){
- if(jQuery(this).is(':checked')){
- jQuery(this).parent('.cusize_check_billing').addClass('activecheck_bill').find('.newslater_label input').removeClass('activecheck_bill');
- }
- else{
- jQuery(this).parent('.cusize_check_billing').removeClass('activecheck_bill');
- }
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement