Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #890083

    Hello Team Enfold
    I’ ve try to add a link to a css after element. I have found this code
    http://jsfiddle.net/r5uWX/1/

    where is best place to paste the code ? i have try the header but the code doesn’t work. any other idea?
    thanks a lot

    • This topic was modified 7 years ago by Meijestic.
    #890105

    Hey Meijestic,

    You would want to add to functions.php. See the following:
    https://kriesi.at/support/topic/add-code-before-body-tag/#post-430004

    Best regards,
    Jordan Shannon

    #890125

    Thanks for reply. How the function have to look like? Could you help me please? I have try this one

    
    function add_custom_tooltip(){
    ?>
    
    $('.image_skm::after').each(function() {
      var link = $(this).html();
      $(this).contents().wrap('<a href="example.com/script.php?id="></a>');
    });
    
    <?php
    }
    add_action('wp_footer', 'add_custom_tooltip');	
    #890185

    Hi,

    Try this:

    function add_custom_tooltip(){
    ?>
    <script>
    jQuery('.image_skm::after').each(function() {
      var link = $(this).html();
      jQuery(this).contents().wrap('<a href="example.com/script.php?id="></a>');
    });
    </script>
    <?php
    }
    add_action('wp_footer', 'add_custom_tooltip');	

    Best regards,
    Jordan Shannon

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