Viewing 13 posts - 1 through 13 (of 13 total)
  • Author
    Posts
  • #387421

    I am, by no means, a coder. I bought this theme because of its ease of use. This is the first brick wall I have hit.
    I have some new pages drafted that use the Theme’s buttons and I am trying to integrate them.
    I was told by the support department of my ticket integration vendor EZtix that they are unable to add the javascript code to the pre-made buttons.

    Is this functionality there? It looks as though I can only add a custom http address (which is not useful in this case.)

    This is the code I want to add to integrate the ‘buy tickets’ buttons:
    Buy Tickets

    #387799

    Hi misterpete!

    Your trying to add some javascript code to our buttons correct? I tried clicking on the “Buy Tickets” link you provided to see the code but it gives me a 404 not found error.

    Best regards,
    Elliott

    #388864
    This reply has been marked as private.
    #389076
    This reply has been marked as private.
    #389079
    This reply has been marked as private.
    #389687

    Hi!

    Try adding this part,

    <script id="eztixKioskLinkId" class="1.10.1" type="text/javascript">
    (function(){
      var ezLoad = document.createElement('script'); ezLoad.type = 'text/javascript';
      ezLoad.src = 'https://kiosk.eztix.co/js/ver'+parseInt(Math.random()*2147483647)+'/kioskIntegrated/kioskIntegratedExtLoader.js';
      var s = document.getElementById('eztixKioskLinkId'); s.parentNode.insertBefore(ezLoad, s.nextSibling);
    })();
    </script>

    Right above line 184 in the footer.php file.

    </body>
    

    Regards,
    Elliott

    #390495
    This reply has been marked as private.
    #390599

    Hey!

    You can paste it into a Code Block element

    Cheers!
    Yigit

    #390869
    This reply has been marked as private.
    #391482

    Hey!

    The buttons have no options for adding onclick behaviours. What you could do though is create your button using our button shortcode and then view the page source and copy it’s HTML and then paste that inside a codeblock element.

    You could then add the necessary classes and onclick attributes.

    Regards,
    Elliott

    • This reply was modified 10 years, 5 months ago by Elliott.
    #392283
    This reply has been marked as private.
    #392535
    This reply has been marked as private.
    #392998

    Hey!

    I’m not sure if this is going to work or related but you can apply an attribute via functions.php: https://kriesi.at/support/topic/add-onclick-event-in-button-shortcode/#post-315947

    Maybe, modify the code a bit to look like this:

    function add_custom_script(){
    ?>
    <script>
    jQuery(window).load(function(){	
    	jQuery('.custom-button a').attr('href', 'javascript:void(0);');
            jQuery('.custom-button a').addClass('eztixKioskLink tourTemplateId_23665');
    });
    </script>
    <?php
    }
    add_action('wp_footer', 'add_custom_script');

    Best regards,
    Ismael

Viewing 13 posts - 1 through 13 (of 13 total)
  • You must be logged in to reply to this topic.