Navigation
This is archived content. Visit our new forum.
  • Author
    Posts
  • #1074720
    Christopher
    Moderator

    Hi there,

    Please add this as well :

    jQuery(".feature-box-graphic-inner a").attr("target","_blank");

    Hope it helps.

    #1218169
    flacnvinyl
    Participant

    I applied this code…

    jQuery(function($) {
      $('.x-feature-box-text a:last-child').each(function() {
        $(this).closest('.x-feature-box').find('.x-feature-box-graphic-inner').wrap('<a href="' + $(this).attr('href') + '"></a>');
        $(this).remove();
      });
    });

    It helped to make the icon clickable. Can we modify this to make the title clickable as well?

    #1218474
    flacnvinyl
    Participant
    This reply has been marked as private.
    #1218555
    Rad
    Moderator

    Hi there.,

    Which title? That wraps the entire box and it includes the title and any content within in. Unless your title is outside that box or in another column/section, then that’s not possible.

    Thanks!

    #1218583
    flacnvinyl
    Participant
    This reply has been marked as private.
    #1218585
    flacnvinyl
    Participant
    This reply has been marked as private.
    #1218846
    Rad
    Moderator

    Hi there,

    Thanks, please change it to this

    jQuery(function($) {
      $('.x-feature-box-text a:last-child').each(function() {
        $(this).closest('.x-feature-box').wrap('<a href="' + $(this).attr('href') + '"></a>');
        $(this).remove();
      });
    });

    cheers!

    #1219284
    flacnvinyl
    Participant

    That worked! I don’t suppose we can allow the text description areas to NOT get wrapped by the url? We only want the icon and the title get wrapped.

    #1219309
    Paul R
    Moderator

    In that case, kindly change the code to this.

    
    jQuery(function($) {
      $('.x-feature-box-text a:last-child').each(function() {
        $(this).closest('.x-feature-box .x-feature-box-graphic').wrap('<a href="' + $(this).attr('href') + '"></a>');
        $(this).closest('.x-feature-box .x-feature-box-title').wrap('<a href="' + $(this).attr('href') + '"></a>');
        $(this).remove();
      });
    });
    

    Hope that helps.

    #1219312
    flacnvinyl
    Participant

    When we applied that code it removed all links. Nothing is clickable. Icon/title/description, nothing is a link.

    #1219336
    Paul R
    Moderator

    Hi,

    Sorry, please change it to this.

    
    jQuery(function($) {
      $('.x-feature-box-text a:last-child').each(function() {
        $(this).closest('.x-feature-box').find('.x-feature-box-graphic').wrap('<a class="my-link" href="' + $(this).attr('href') + '"></a>');
        $(this).closest('.x-feature-box').find('.x-feature-box-title').wrap('<a class="my-link" href="' + $(this).attr('href') + '"></a>');
        $(this).remove();
      });
    });
    

    Then add this in Custom > Edit Global CSS in the customizer

    
    .my-link {
        display:table-cell;
    }
    

    Hope that helps.

    #1219475
    flacnvinyl
    Participant

    PERFECT! Thank you!

    #1219553
    Joao
    Moderator

    Glad to hear it,

    Joao

    #1221344
    flacnvinyl
    Participant
    This reply has been marked as private.
    #1221694
    flacnvinyl
    Participant
    This reply has been marked as private.
  • <script> jQuery(function($){ $("#no-reply-628439 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>