Support » Plugin: Ajax Pagination and Infinite Scroll » run javascript before next page load

  • first of all thanks again for the great plugin,your work is really appreciated.

    I want to run a JavaScript to add some css to the Posts Selector while the plugin is in loading mode and then remove them after the next page is loaded .

    any help really appreciated.

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


    Currently there isn’t any events triggered at these points of the process. However it’s a good idea and will give it some consideration to help increase the flexibility.

    Thread Starter Milad Jafari


    yeah you can make the loading effect more fancy.

    im not developer sorry, how can i add this css just after
    $(‘.malinky-ajax-pagination-loading[data-paginator-count=”‘ + mymapPaginatorCount + ‘”]’).show()
    in the main.js
    i just want to set the Posts Selector opacity to 0.5 just after loading effect appeared and then when loading effect is hiding make Posts Selector opacity to 1
    where i should put this line of JavaScript and how can i get post selector variable to apply opacity to the post selector .

    sorry for english.

    Plugin Author craigramsay


    In version 2.0.0 you can use a couple of events for this. There is a malinkyLoadPostsStart and malinkyLoadPostsComplete event. You could add event listeners to these to add and remove the effects you wish.

    I wouldn’t advise amending main.js as you do above as it will break following any plugin update.


Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘run javascript before next page load’ is closed to new replies.