defunkt / jquery-pjax

pushState + ajax = pjax
https://pjax.herokuapp.com
MIT License
16.73k stars 1.97k forks source link

initializeMyPlugin() is not a function error when reinitializing plugins after a pjax request. #694

Open reservedprem opened 6 years ago

reservedprem commented 6 years ago

Uncaught TypeError: $(...).initializeMyPlugin is not a function at HTMLDocument. (2:132) at HTMLDocument.dispatch (VM4611 app.js:1) at HTMLDocument.g.handle (VM4611 app.js:1) at Object.trigger (VM4611 app.js:1) at HTMLDivElement. (VM4611 app.js:1) at Function.each (VM4611 app.js:1) at yt.fn.init.each (VM4611 app.js:1) at yt.fn.init.trigger (VM4611 app.js:1) at fire (VM4614 jquery.pjax.js:199) at yt.fn.init.options.complete (VM4614 jquery.pjax.js:239) (anonymous) @ 2:132 dispatch @ VM4611 app.js:1 g.handle @ VM4611 app.js:1 trigger @ VM4611 app.js:1 (anonymous) @ VM4611 app.js:1 each @ VM4611 app.js:1 each @ VM4611 app.js:1 trigger @ VM4611 app.js:1 fire @ VM4614 jquery.pjax.js:199 options.complete @ VM4614 jquery.pjax.js:239 u @ VM4611 app.js:1 fireWith @ VM4611 app.js:1 r @ VM4611 app.js:1 (anonymous) @ VM4611 app.js:1 XMLHttpRequest.send (async) send @ VM4611 app.js:1 ajax @ VM4611 app.js:1 pjax @ VM4614 jquery.pjax.js:360 handleClick @ VM4614 jquery.pjax.js:93 (anonymous) @ VM4614 jquery.pjax.js:38 dispatch @ VM4611 app.js:1 g.handle @ VM4611 app.js:1 23:17:21.332

razh commented 6 years ago

initializeMyPlugin is an example function name. You need to replace it with the jQuery plugins that you are using.