• I’m trying to add Banners after every load almComplete(), but the problem is that must of the AdServers give a <script> tag and when I do:

    <script>
            /* <![CDATA[ */
                $.fn.almComplete = function(alm){
                  $('.alm-seo').append('<div class="m-block m-block--grid article"><header class="m-block__header cf"><h6>publicidad<\/h6><\/header><div class="pinnned_wrapper"><div class="m-block__body cf"><figure data-dimensions="300x250" class="lazyload" style="width: 300px;"><script> eplAD4M("970x90_a"); <\/script><\/figure><\/div><\/div>');
                };
                console.log('Done');
            /* ]]> */
        </script>

    When I clicked LoadMore , the posts aren’t loaded, instead something really odd happened ,
    the page load only :

    <html><head></head><body><div id="eplAdDiv970x90_a"></div></body></html>

    and everything else disappears.

    and Cosole Log gave me: alm-seo.min.js?ver=1.5.2:23 Uncaught TypeError: Cannot read property 'top' of undefined.

    Maybe the solution is inside the repeater with php and a $count++ but I don’t know if that can be done .

    Thanks

    UPDATE

    I forgot to tell that if I remove :

    <script> eplAD4M("970x90_a"); <\/script>

    from the callback , the Div is printed right after all the post are loaded

    https://www.ads-software.com/plugins/ajax-load-more/

Viewing 1 replies (of 1 total)
  • Plugin Author Darren Cooney

    (@dcooney)

    Hi,
    I’m not fully following what you are trying to do…. But the one issue may be the script tag in the complete callback.

    I believe you should be using the getScript() function for this.

    Make sense?

Viewing 1 replies (of 1 total)
  • The topic ‘Add in callback’ is closed to new replies.