• perstef

    (@perstef)


    hi, It’s a shame that Ocean Modal can’t be loaded when a page is launched. Do you have any alternative solutions or development projects on this subject?

    Thank you

    Stéphane

Viewing 1 replies (of 1 total)
  • Shahin

    (@skalanter)

    Hello @perstef,

    Thank you for reaching out to us.

    While this option is not available on the plugin, you can add a custom JS for the modal you want to achieve. In this case, you must find the “ID” of that modal and change the code below. Also, you can add more models like the example below.

    Please put the JS below in Customizing > Custom CSS/JS > JS Section:

    
    jQuery(document).ready(function() {
        // Add "omw-open" class and inline styles to element with ID "omw-1856"
        jQuery("#omw-1856").addClass("omw-open").attr("style", "opacity: 1; display: block;");
      
        // Add inline styles to element with class "omw-modal-overlay"
        jQuery(".omw-modal-overlay").attr("style", "opacity: 1; display: block;");
      
        // Event listener for clicking elements with "omw-close-modal" class
        jQuery(document).on("click", ".omw-close-modal", function() {
          // Remove "omw-open" class and inline styles from element with ID "omw-1856"
          jQuery("#omw-1856").removeClass("omw-open").removeAttr("style");
      
          // Remove inline styles from all elements with class "omw-modal-overlay"
          jQuery(".omw-modal-overlay").removeAttr("style");
        });
    });
    

    Please read this link for more information about the CSS/JS code on the customizer: https://docs.oceanwp.org/article/354-add-custom-css-and-js-to-your-website.

    Note 1: If you have any cache plugin or server cache(CDN / Browser Cache and Cookies and …), you need to clear its cache contents or disable them to see your changes. Also, remember to click on the regenerate all assets file and data in Elementor > Tools(if you have Elementor).

    Note 2: Since it is a customization, if you are not familiar with JS, you can contact a JavaScript expert for more customization on it.

    I hope it helps.
    Best Regards

Viewing 1 replies (of 1 total)
  • The topic ‘Modal autoload’ is closed to new replies.