Support » Plugin: TranslatePress - Translate Multilingual sites » Translation not working after DOM change?

  • Resolved tcsmox


    I have a site where i had to use javascript to move the content of a div into another one and show it as a popup. Unfortunately the translations do not work on the popup. The code is similar to this one:

    var content = $('.post-content').html();

    Is there a function that i can call to enable the translation?
    According to this documentation, this plugin has a dom change listener:

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Razvan Mocanu



    JS operations done with html() should be detected by the DOM change listener.
    Is it possible to provide the entire code and steps on how to replicate the behaviour?

    Hi, I’m sorry for the delay, here is the code:

    $('.box-container .toggler').on('click', function ()
    	  var content = $(this).parents('.box').find('.post-content').html();
    	  var $modal = $('#post-box-popup');
    	  $modal.fadeIn().css({top: + 40});
    	  $modal.find('.close').on('click', function ()
    • This reply was modified 1 year, 1 month ago by tcsmox.
    Plugin Author Razvan Mocanu



    It’s not possible for me to replicate your scenario with only this function.
    Please open a support ticket and send me a link to your website if possible.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Translation not working after DOM change?’ is closed to new replies.