peachananr / onepage-scroll

Create an Apple-like one page scroller website (iPhone 5S website) with One Page Scroll plugin
http://peachananr.github.io/onepage-scroll/Demo/demo.html
9.54k stars 2.06k forks source link

destroy and rebuild one_page_scroll on ajax load content #339

Open amitabhaghosh197 opened 6 years ago

amitabhaghosh197 commented 6 years ago

Hi, This is a great plugin and really a simple one. But I am stuck somewhere. Actually, I am developing a project wherein each section will be a call to action button which when clicked will modify the content with the content from a separate page of the relevant section through ajax load (XMLHttpRequest()) and on the changed content content there will be another button which when clicked will revert back to the previous section. These all are working fine. But somehow I need to destroyand re-build your plugin on ajax call. I have checked your source code but there I could not find any functions. Could you please help me with any tips on how will I do those. I have also tried to $.removeData($element.get(0)); but I failed.

Thanks in advance.