Navigation
This is archived content. Visit our new forum.

Tagged: 

  • Author
    Posts
  • #873398

    leomrus
    Participant

    Hello,

    I made promo page on my site and try to make usable navigation for smartphones and tablets.
    I use Feature boxes because it is href inside. But unfortunately it is not work.
    http://cubiculum.ru/quests/quests-discounts-special-offers/
    on this page only on tablet and smartphone resolution this (see screenshot) colored 4 small feature boxes, I want to use them as links. Is it possible?

    All boxes has special CSS classes: phone-menu-buttons-students, phone-menu-buttons-two, phone-menu-buttons-big, phone-menu-buttons-red and they should have links to another features boxes on this page: #students, #two, #big and #red.

    Thank you in advance.

    #873935

    Rue Nel
    Moderator

    Hello There,

    Thanks for writing in! Regretfully the Feature box content only accept simple text at the moment. Link is not yet possible. Link can be added via the LINK TEXT and HREF property. For the meantime, here’s the workaround I would recommend. Please edit your page in Cornerstone, go to the settings tab, Settings > Custom JS and insert the following custom js code,

    jQuery(document).ready(function($) {
      $('.x-feature-box').each(function() {
        var self = $(this),
            icon_href = self.find('.x-feature-box-text a:last-child').attr('href');
        if ( icon_href.length > 0) {
          $(self).find('.x-feature-box-graphic-inner > *').wrap(function() {
            return '<a href="' + icon_href + '" target="_blank"></a>';
          });
        }
      });
    });

    And please do not forget to insert the Link Text and the Href for the link option.
    http://prntscr.com/aq0w4h

    Hope this would help you.

    #874586

    leomrus
    Participant

    Many thanks,
    It works
    I just modify your code and made target=”_self”, and link text: “free spaces”, and icons on desktop browser are clickable, but all another text none.

    Could I modify code and make clickable title of feature box? It is difficult to catch icon as href on smartphone. I do not want to use additional text as links it will looks not good for me.

    #874597

    leomrus
    Participant

    Ohhhh, I made it by tags ))) many thanks

    #875016

    Christian
    Moderator

    Glad you’ve sorted it out. 🙂