{"action":"closed","issue":{"url":"https://api.github.com/repos/webcreate/infinite-ajax-scroll/issues/190","repository_url":"https://api.github.com/repos/webcreate/infinite-ajax-scroll","labels_url":"https://api.github.com/repos/webcreate/infinite-ajax-scroll/issues/190/labels{/name}","comments_url":"https://api.github.com/repos/webcreate/infinite-ajax-scroll/issues/190/comments","events_url":"https://api.github.com/repos/webcreate/infinite-ajax-scroll/issues/190/events","html_url":"https://github.com/webcreate/infinite-ajax-scroll/issues/190","id":66457724,"number":190,"title":"Reload content","user":{"login":"popovae","id":6538329,"avatar_url":"https://avatars.githubusercontent.com/u/6538329?v=3","gravatar_id":"","url":"https://api.github.com/users/popovae","html_url":"https://github.com/popovae","followers_url":"https://api.github.com/users/popovae/followers","following_url":"https://api.github.com/users/popovae/following{/other_user}","gists_url":"https://api.github.com/users/popovae/gists{/gist_id}","starred_url":"https://api.github.com/users/popovae/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/popovae/subscriptions","organizations_url":"https://api.github.com/users/popovae/orgs","repos_url":"https://api.github.com/users/popovae/repos","events_url":"https://api.github.com/users/popovae/events{/privacy}","received_events_url":"https://api.github.com/users/popovae/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2015-04-05T16:47:36Z","updated_at":"2016-08-26T14:02:18Z","closed_at":"2016-08-26T14:02:18Z","body":"Hi!\r\n\r\nThank you for your plugin. I just started to test it to see if it will fit our project... So the main question for now is:\r\n\r\nI have the following setup of IAS\r\n\r\n```javascript\r\n<script type=\"text/javascript\">\r\n\t$(document).ready(function() {\r\n\t\t    var container = document.querySelector('#post-masonry');\r\n\t\t    var msnry = new Masonry( container, {\r\n\t\t      // options\r\n\t\t      itemSelector: '.post-item'\r\n\t\t    });\r\n\t\t\r\n\t\t    var ias = $.ias({\r\n\t\t      container: \"#post-masonry\",\r\n\t\t      item: \".post-item\",\r\n\t\t      pagination: \"#pagination\",\r\n\t\t      next: \".next a\",\r\n\t\t      negativeMargin: 1500\r\n\t\t    });\r\n\r\n\t\t    ias.on('render', function(items) {\r\n\t\t      $(items).css({ opacity: 0 });\r\n\t\t    });\r\n\t\t    \r\n\t\t    ias.on('rendered', function(items) {\r\n\t\t      msnry.appended(items);\r\n\t\t      msnry.layout();\r\n\t\t    });\r\n\t\t\r\n\t\t\tjQuery.ias().extension(new IASPagingExtension());\r\n\t\t\t\r\n\t\t\tjQuery.ias().on('pageChange', function(pageNum, scrollOffset) {\r\n\t\t\t\t\tevent.url = event.url + \"?page=\"+ pageNum;\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\t ias.extension(new IASSpinnerExtension());\r\n\t\t    \r\n\t\t    ias.extension(new IASHistoryExtension({\r\n\t\t\t//    prev: '.previous',\r\n\t\t\t}));\r\n\t\t\t\r\n\t\t    ias.extension(new IASNoneLeftExtension({html: '<div class=\"ias-noneleft\" style=\"text-align:center\"><p><em>You reached the end!</em></p></div>'}));\r\n    });\r\n  </script>\r\n```\r\n\r\nAll the content is generated by PHP page where this code is located, so i have index.php and the Next page is index.php?page=2 and etc... everything works fine...\r\nWhat I want to do next is somehow reload the content of the page current page (lets assume we have index.php?page=2&search=something, I want to get contents of index.php?page=1&search=somethingelse without page reload)\r\nSo I thought of some kind of workaround\r\n\r\n```\r\nfunction reload(){\r\n\r\n\t\t$('#pagelist').html('<a href=\"list.php?page=1&qsearch=some\">next</a>');\r\n\t\tjQuery.ias().reinitialize();\r\n\t\t//the problem starts when you uncomment this line\r\n\t\t//$('#post-masonry').html('');\r\n\t\tjQuery.ias().next();\r\n\t}\r\n```\r\nIt works perfectly - adds new content to the end of existing... BUT as soon as I uncomment $('#post-masonry').html(''); everything breaks... \r\nSo, I can not get why it is happening? Maybe you have some Ideas or can advise easier way to do it?"}}
{"actor":{"display_login":"fieg"}}