Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #260349

    I have a Contact Form 7 contact form that opens in a light box … It is used any time there is a button to make contact with the site owner.

    To accomplish this – I have created a custom CSS class button (that exactly match the theme’s buttons) to replace the standard theme button used in the Avia editor / widgets etc.

    I can’t however seem to use this custom created button for the Promo Box … and I don’t really want to recreate the entire style of the Promo Box just for the button if possible – as this would make it somewhat confusing for the site owner to update in future (Avia is very simple and easy to use for them).

    Is there some way to have the lightbox open via the Promo box setting (eg can I use the link section in the promotion box somehow)? Can I swap out some code / css somewhere to accomplish this? (note the button text is different for most promo box buttons).

    Thanks!

    #261129

    Hi,

    You can try mirroring a click (keeping both buttons on the Page would be needed), something like this at the end of js/avia.js:

    jQuery(function() {
    jQuery(".promo_button").click(function(){
    jQuery(".button_that_works").trigger("click");
    });
    });

    Regards,
    Josue

    #261864

    HI Josue,

    Thanks for taking the time to reply.

    So are you saying I need to add that code to the end of the js/avia.js file?

    #261982

    Hey!

    Yes, but you’d need to change the classes according to the buttons you have.

    Regards,
    Josue

    #274970
    This reply has been marked as private.
    #275237

    Hi,

    Can you post a link to the page where you are trying this? a screenshot noting where both buttons are would be helpful too.

    Best regards,
    Josue

    #275243
    This reply has been marked as private.
    #275265

    Add this at the very end of your theme functions.php file:

    function add_custom_script(){
    ?>
    <script>
    jQuery(window).load(function(){
    jQuery('.av_promobox .avia-button').on('click', function(e){
    e.preventDefault();
    jQuery('.cboxElement').trigger('click');
    });	       
    });
    </script>
    <?php
    }
    add_action('wp_footer', 'add_custom_script');

    Cheers!
    Josue

Viewing 8 posts - 1 through 8 (of 8 total)

You must be logged in to reply to this topic.