how to get this function in wordpress theme which

2019-09-12 05:39发布

问题:

both have same wordpress theme but there is a difference coupon should be copied and should be opened in new tab no pop up window should be opened to ask open site my link is

enter code herehttp://couponsgrabber.in/coupon/rs-300-purchase-rs-2499/

and want like this

http://www.bigrockcouponcodes.in

回答1:

if you can change some code then it is very easy.

First : you can need change css class

a.coupon-code-link {
    background: url("images/bg-coupon-code-left.gif") no-repeat scroll left top rgba(0, 0, 0, 0);
    display: block;
    margin: 0;
    position: relative;
    text-decoration: none;
    z-index: 1;
}

change in to

a.coupon-code-link1 {
    background: url("images/bg-coupon-code-left.gif") no-repeat scroll left top rgba(0, 0, 0, 0);
    display: block;
    margin: 0;
    position: relative;
    text-decoration: none;
    z-index: 1;
}

Second :

You can need find correct file where add this class [coupon-code-link]

coupon-code-link class change in to  coupon-code-link1


<a data-clipboard-text="NTCV7WCSVH" target="_blank" class="coupon-code-link" id="coupon-link-94" href="http://coupons.amazkart.in/view-coupon/rs-300-purchase-rs-2499/94"><span>Show Coupon Code</span></a>
                    </div>

change into

<div class="link-holder">
                                                <a data-clipboard-text="NTCV7WCSVH" target="_blank" class="coupon-code-link1" id="coupon-link-94" href="http://coupons.amazkart.in/view-coupon/rs-300-purchase-rs-2499/94"><span>Show Coupon Code</span></a>
                    </div>

and it will work fine.

hope this help !

can you try



回答2:

I have attached screenshot according changes please check



回答3:

please change this code in js file

jQuery(".coupon-code-link1").zclip({
    copy: jQuery(this).data('clipboard-text'),
    afterCopy:function(){
//
}


});

jQuery( document ).on('click', '.coupon_type-coupon-code a.coupon-code-link1', function() {
            var couponcode = jQuery(this).data('clipboard-text');
            var linkID = jQuery(this).attr('id');

            jQuery(this).fadeOut('fast').html('<span>' + couponcode + '</span>').fadeIn('fast');



            jQuery(this).parent().next().hide();



            /*jQuery.colorbox({
                href: clipper_params.ajax_url + "?action=coupon-code-popup&id=" + linkID,
                transition:'fade',
                maxWidth:'100%',
                onLoad: function() {
                    if ( clipper_params.is_mobile ) {
                        jQuery('#cboxOverlay, #wrapper').hide();
                    }
                },
                onComplete: function() {
                    ZeroClipboard.config( { moviePath: clipper_params.templateurl + '/includes/js/zeroclipboard/ZeroClipboard.swf' } );
                    var clip = new ZeroClipboard( jQuery('#copy-button') );
                    clip.on( 'complete', function( client, args ) {
                        jQuery("#copy-button").html(clipper_params.text_copied);
                    });
                    clip.on( 'mouseover', function( client ) {
                        jQuery("#copy-button").addClass('hover');
                    });
                    clip.on( 'mouseout', function( client ) {
                        jQuery("#copy-button").removeClass('hover');
                    });
                    clip.on( 'noflash', function( client ) {
                        jQuery("#copy-button").remove();
                    });
                    clip.on( 'wrongflash', function( client ) {
                        jQuery("#copy-button").remove();
                    });
                },
                onCleanup: function() {
                    ZeroClipboard.destroy();
                    if ( clipper_params.is_mobile ) {
                        jQuery('#wrapper').show();
                    }
                }
            });
            return false;*/
        });

    }

please try..



标签: wordpress