Tagged: avia builder, event, on click, tabs
-
AuthorPosts
-
May 22, 2014 at 6:16 pm #268710
I really hope you can help me with this. See this page on my website
http://www.cintosmart.com/cintosmart-services/digital-strategy/
I used the Avia page builder to build the page and included a tab component to build the tabbed packages presentation. The client then wanted me to include images in a row above the tab panel to display the relevant content for that package when clicked. The only way I know to achieve this was to use anchor links. I found the anchor links by clicking the tabs and then get the URL from the address bar. The client dont like the way the page jump to the tabbed content. It moves the page down and also hide the pack images.
I am not a developer but I think the solution would be to add an “on-click” event to each pack thumbnail to execute the same script when a user would click on one of the tabs. Problem is that I dont have an idea how to do this or where to find the J Query file for the tabs element.
Can you please help me with a solution. The client insist that I get this right.May 22, 2014 at 7:27 pm #268743Hi,
Try adding this at the end of the theme functions.php:
function add_custom_script(){ ?> <script> jQuery(window).load(function(){ jQuery("a[href*='tab-id']").on('click', function(){ jQuery(window).scrollTop(100); }); }); </script> <?php } add_action('wp_footer', 'add_custom_script');
Regards,
JosueMay 22, 2014 at 11:04 pm #268895Josue, you are a genius!! Wish I could be this clever. Thank you for your quick response and solution to my problem. You’re the best.
May 22, 2014 at 11:15 pm #268900You are welcome, always glad to help :)
January 10, 2016 at 6:24 pm #562762@Josue and what if I have one tab to be linked to external page? How would you link this particular tab then?
January 10, 2016 at 7:20 pm #562780Hey!
To link a tab to external page, would require some extensive customization to the shortcode or the full login, to have an extra link field.
I am not sure it can be done that easy, or be maintained.Best regards,
Basilis -
AuthorPosts
- You must be logged in to reply to this topic.