SVG Icon Implementation
February 10, 2025 · AI Conversations
Online-Termin
using jquery in unde this
### 1️⃣ **Toggle Mobile Menu**
If you want to toggle the mobile menu on button click:
jQuery(document).ready(function($) {
$('.menu-toggle-btn').on('click', function() {
$('.fusion-mobile-nav-holder').toggleClass('active');
});
});
Add CSS to show/hide it properly:
.fusion-mobile-nav-holder {
display: none;
}
.fusion-mobile-nav-holder.active {
display: flex;
}
### 2️⃣ **Append/Modify Menu Items**
If you need to add an extra menu item dynamically:
jQuery(document).ready(function($) {
$('.fusion-mobile-nav-holder').append('<li><a href="/custom-link">Custom Link</a></li>');
});
### 3️⃣ **Change the Menu Display Style**
If you want to control the menu's visibility:
jQuery(document).ready(function($) {
$('.fusion-mobile-nav-holder').css('display', 'block'); // or 'flex'
});
Let me know what exact functionality you're looking for! 🚀
Online-Termin
div with class "molo"
If you're using JavaScript (jQuery-based method for WordPress/Avada):
jQuery(document).ready(function($) {
$('.fusion-mobile-nav-holder').prepend('<div class="molo"><div class="details-logo"> ... </div></div>');
});
If modifying the template directly, place:
<div class="fusion-mobile-nav-holder">
<div class="molo">
<div class="details-logo">
<div class="contact-icons">
<!-- Your SVG icons go here -->
</div>
</div>
</div>
<!-- Existing content -->
</div>
Let me know if you need this dynamically added in a specific way!
### **Using jQuery**
jQuery(document).ready(function($) {
if (!$('.fusion-mobile-nav-holder .molo').length) {
$('.fusion-mobile-nav-holder').prepend('<div class="molo"><div class="details-logo"> ... </div></div>');
}
});
### **How It Works?**
1. `$('.fusion-mobile-nav-holder .molo').length` checks if `.molo` already exists inside `.fusion-mobile-nav-holder`.
2. If it doesn’t exist, it prepends the “ only once.
This ensures that even if the script runs multiple times, the “ won't be duplicated.
Let me know if you need it in plain JavaScript! 🚀