How to remove /# links from elements
-
I am using the theme Megatron and have used certain shortcodes to display benefits and how it works. These are shown as’icons’ and ‘processes’.
When adding the content to the visual composer (backend editor) it asks for a link for each icon, i do not want these links so i leave them blank.
This is creating multiple /# links on my pages which i would love to know how to remove.
You can see on the home page Brandbear.com where the ‘benefits’ are and ‘how it works’
Any help would be great
The page I need help with: [log in to see the link]
-
Do you mind if the animation disappears with the link?
in a perfect world i would want the animation to stay put as looks good, but if that is impossible i can live with out
This will involve CSS and JS fixes;
- Install this plugin: https://en-gb.ww.wp.xz.cn/plugins/custom-css-js/
- Go to the “Edit CSS Code” part of the dashboard
- In the sidebar make sure the “Options” are set to:
– Internal
– Header
– In Frontend - In the main code field (the one withh
<style ...), add this code:.iconbox.top-inline .icon-box-shape .icon-without-link { display: block; position: absolute; width: 70px; text-align: center; padding-left: 0; } .iconbox .icon-box-shape .icon-without-link i { display: inline-block; font-size: 32px; } .iconbox.default.top-inline:hover .icon-box-shape .icon-without-link i { -webkit-transform: scale(1.3); -moz-transform: scale(1.3); -ms-transform: scale(1.3); -o-transform: scale(1.3); transform: scale(1.3); } .iconbox .icon-box-shape .icon-without-link i, .iconbox .icon-box-shape .icon-without-link img { -webkit-transition: .3s; -moz-transition: .3s; -ms-transition: .3s; -o-transition: .3s; transition: .3s; } .iconbox.top-inline h3 { padding-top: 8px; } - Save
- Then go to the “Edit JS Code” part of the dashboard
- In the sidebar make sure the “Options” are set to:
– External file
– Footer
– In Frontend - In the main code field (the one withh
<script...), add this code:$ = jQuery; var iconWrappers = $('.icon-box-shape'); iconWrappers.each(function() { var wrapper = $(this), icon = wrapper.find('.micon'), // Assume the title is adjacent to wrapper iconTitle = wrapper.next(), iconTitleLink = iconTitle.find('a'), newContainer = $('<span class="icon-without-link" />'); // Check if the icon has a link if (icon.parent().is('a')) { // Unwrap the link around the icon icon.unwrap(); // Wrap a new element around the icon for styling purposes icon.wrap(newContainer); } // Check if the adjacent element to the wrapper is the title if (iconTitleLink.length !== 0) { if (iconTitleLink.attr('href') === '#') { var iconTitleText = iconTitle.text(); // Remove the link around the title text iconTitleLink.remove(); // Add the text alone inside the title iconTitle.html(iconTitleText); } } }); - Save
The topic ‘How to remove /# links from elements’ is closed to new replies.