• Resolved Darren Cooney

    (@dcooney)


    Hi,
    Thanks for a nice plugin!

    I’m the developer of the Ajax Load More plugin and I was wondering if you have a method to load prismatic via Ajax?

    The use case I’m looking for is a user views a blog post that doesn’t contain Prismatic, they load the next post via infinite scroll and that post contains some pristmatic markup.

    I’d like to know if there is a JS function I can call in a callback to format the code?

    thanks,

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Jeff Starr

    (@specialk)

    Hello, there is no Ajax support built in to the plugin currently. It’s all PHP/core functionality based filtering post content.

    But it’s an interesting idea and I will take a look and see if there is anything that can be added to support Ajax loading in a future plugin update.

    Thanks for bringing this to my attention

    Thread Starter Darren Cooney

    (@dcooney)

    Thanks @specialk

    Turns out that Prism does offer some functions to trigger after an Ajax load so I have that working ??
    https://prismjs.com/docs/Prism.html#.highlightAllUnder

    My last issue is around the enqueuing of assets.
    In your experience with Prism, do you happen to know the best way to enqueue all the Prism assets up front? Say I only need the CSS, core JS and PHP/JavaScript highlighting.

    thanks and sorry for all the questions.

    Plugin Author Jeff Starr

    (@specialk)

    I would take a look at the enqueue functions located in /inc/resources-enqueue.php would be your best bet. Hopefully something there will be useful.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Initiate After Ajax Load’ is closed to new replies.