• Actually I have two questions
    1. Why is this file /wp-content/uploads/oceanwp/mian-scripts.js used and not this one form /wp-content/themes/oceanwp/assets/js/main.min.js ?
    2. How to override one function (oceanwpDropDownMobile()) ? I need to change some settings, and I don’t want to replace the whole file with the one from child theme because I will lose future updates. I just don’t want this one function to be automatically updated. How to solve such a situation?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Hello @lutol, how are you?

    Can you detail what you wish to accomplish so that we can provide you with the code snippet specifically for it?

    However, You may override the file by adding your custom JS to Customise > Custom CSS/JS and drop it on the Custom JS box.

    I hope this helps.

    Thread Starter lutol

    (@lutol)

    I want to change slide timing in the oceanwpDropDownMobile() function. I don’t want them to slide but just open like both
    $j('#mobile-dropdown').slideToggle(0);
    $j('#mobile-dropdown').slideUp(0);

    I want them to be set to 0. So, now I’ve changed that in main file, but it may by overwritten after theme updates.
    This is a simple example of modifications, how to handle such a situation?

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Override only one function in js file?’ is closed to new replies.