Hallo liebes Kriesi Team,
ich verweise in einem Icon auf einen Anker und möchte diesem Ankerlink ein onclick=”” Event hinzufügen.
Scheinbar wird dies nich direkt übernommen. Oder?
Was kann ich tun? Web – Suche war leider erfolglos.
Danke und Grüße
Martin
Hey Martin,
Here is the code you can put in your funtions.php
function av_button_click_handler() {
?>
<script>
jQuery(window).load(function() {
jQuery(".av_textblock_section .veranstaltungen h6 a]").click(function(){
//your code here
});
});
</script>
<?php
}
add_action('wp_footer', 'av_button_click_handler');
If you need further assistance please let us know.
Best regards,
Victoria
Hello Victoria,
thank you that helped a lot. Here is my solution.
function av_button_click_handler() {
?>
<script>
jQuery(window).load(function() {
$(“a.av-icon-char[href$=’#grad’]”).click(function(){
$(‘#kasten’).fadeIn(2000);
});
});
</script>
<?php
}
add_action(‘wp_footer’, ‘av_button_click_handler’);
?>
Best regards
Martin
Hi Martin,
Great, glad you got it working and thanks for sharing. Please let us know if you should need any further help on the topic or if we can close it.
Best regards,
Rikard
Hello Rikard,
thank you very much. I don’t need further help on the topic. You can close it.
Best regards
Martin