• Hello

    The problem is, the plugin does “break” after a AJAX event happens.

    Example:

    many code snippets on a AJAX paginated page
    10 code snippets per “page”, AjAX pagination leads to next 10 snippets etc.

    After you browse the paginated pages once (AJAX is used) all the JS related functions of the plugin are broken.

    The code still displays correctly, but the “copy to clipboard” etc, syntax highlighting, all that breaks

    I have 2 options to solve:

    1. You name me the function name responsible of fall this (JS Function), I can try to fix
    2. You fix an update 🙂

    thanks, appreciate co-work

    https://wordpress.org/plugins/mivhak/

Viewing 1 replies (of 1 total)
  • Plugin Author Askupa Software

    (@askupa-software)

    Hi, thank you for offering your help!
    There is a single function call that initiates Mivhak for a given set of elements. For example, if you want Mivhak to prettify all of your document you can use:

    $(document).mivhak(mivhak_settings);
    

    Where mivhak_settings is a global variable set by PHP (you don’t need to worry about that). If you want to highlight the elements that were added using Ajax, you can call –

    $('#name-of-ajax-container').mivhak(mivhak_settings);
    

    Take a look at app/assets/js/_core.js, that’s the script that handles it.
    Let me know if you were able to fix it, and I will incorporate it into the next release.

Viewing 1 replies (of 1 total)
  • The topic ‘Problem with AJAX’ is closed to new replies.