
-
AuthorPosts
-
January 28, 2015 at 10:13 pm #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 TicketsJanuary 29, 2015 at 5:20 pm #387799Hi 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,
ElliottJanuary 31, 2015 at 10:49 pm #388864This reply has been marked as private.February 1, 2015 at 10:50 pm #389076This reply has been marked as private.February 1, 2015 at 11:01 pm #389079This reply has been marked as private.February 2, 2015 at 10:14 pm #389687Hi!
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,
ElliottFebruary 4, 2015 at 3:41 am #390495This reply has been marked as private.February 4, 2015 at 10:01 am #390599February 4, 2015 at 7:10 pm #390869This reply has been marked as private.February 5, 2015 at 5:51 pm #391482Hey!
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.
February 6, 2015 at 9:58 pm #392283This reply has been marked as private.February 7, 2015 at 6:48 pm #392535This reply has been marked as private.February 9, 2015 at 1:11 pm #392998Hey!
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 -
This reply was modified 10 years, 5 months ago by
-
AuthorPosts
- You must be logged in to reply to this topic.