Home Forums WoodMart support forum Replace Hover Trigger with onClick on Woodmart Stick Navigation

Replace Hover Trigger with onClick on Woodmart Stick Navigation

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #513014

    sergenadiyaman
    Participant

    Hello

    I want to change hover action for desktop of wd-stick navigation
    I want before:after click js

    #513276

    Luke Nielsen
    Keymaster

    Hello,

    At the moment, we have onClick functionality on the “Sticky navigation” element itself from the header: https://gyazo.com/a82e6844c0a199bb38b1907031bc51c8

    https://prnt.sc/zf6X3vOTDkOg

    Unfortunately, there is no option in Theme Settings to open it by clicking on the navigation panel itself: https://prnt.sc/0HsctkbOyA15

    Kind Regards

    #515718

    sergenadiyaman
    Participant

    I am trying this custom.js code and also I added custom fuction.php code
    but it didnot work

    `jQuery(document).ready(function($) {
    // Select the sticky navigation menu item
    var $stickyNavItem = $(‘.wd-sticky-nav’);

    // Remove existing hover behavior
    $stickyNavItem.off(‘mouseenter’).off(‘mouseleave’);

    // Add click event
    $stickyNavItem.on(‘click’, function() {
    // Your onclick function code
    // For example, toggle a class to change styles
    $(this).toggleClass(‘active’);

    function enqueue_custom_scripts() {
    wp_enqueue_script(‘jquery’);
    wp_enqueue_script(‘custom-script’, get_stylesheet_directory_uri() . ‘/js/custom.js’, array(‘jquery’), null, true);
    }
    add_action(‘wp_enqueue_scripts’, ‘enqueue_custom_scripts’);

    #515804

    Luke Nielsen
    Keymaster

    Hello,

    Sorry, but fixing the third-party code or making Customization is not included in our support, it is beyond our limitations and support policy scope. Hope you can understand our limitations.

    Don’t hesitate to let me know if you need any further help or any other info

    Kind Regards

Viewing 4 posts - 1 through 4 (of 4 total)