{"action":"created","issue":{"url":"https://api.github.com/repos/laxap/bootstrap_grids/issues/4","repository_url":"https://api.github.com/repos/laxap/bootstrap_grids","labels_url":"https://api.github.com/repos/laxap/bootstrap_grids/issues/4/labels{/name}","comments_url":"https://api.github.com/repos/laxap/bootstrap_grids/issues/4/comments","events_url":"https://api.github.com/repos/laxap/bootstrap_grids/issues/4/events","html_url":"https://github.com/laxap/bootstrap_grids/issues/4","id":124260060,"number":4,"title":"Putting flexslider configuration JS on bottom","user":{"login":"Toccamonium","id":1674576,"avatar_url":"https://avatars.githubusercontent.com/u/1674576?v=3","gravatar_id":"","url":"https://api.github.com/users/Toccamonium","html_url":"https://github.com/Toccamonium","followers_url":"https://api.github.com/users/Toccamonium/followers","following_url":"https://api.github.com/users/Toccamonium/following{/other_user}","gists_url":"https://api.github.com/users/Toccamonium/gists{/gist_id}","starred_url":"https://api.github.com/users/Toccamonium/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Toccamonium/subscriptions","organizations_url":"https://api.github.com/users/Toccamonium/orgs","repos_url":"https://api.github.com/users/Toccamonium/repos","events_url":"https://api.github.com/users/Toccamonium/events{/privacy}","received_events_url":"https://api.github.com/users/Toccamonium/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-12-29T19:53:44Z","updated_at":"2016-04-13T08:52:08Z","closed_at":"2016-02-06T10:19:19Z","body":"Hi Pascal,\r\nthanks for this useful extension. Right now I have an issue with the dynamic flexslider configuration JS code, which is written into the page. Due to page speed optimization all my JS loads before the closing body tag. Hence I'd like to know how to move the code, written after the slider (append), to the absolute end of the page, like page.jsFooterInline does. Thanks! "},"comment":{"url":"https://api.github.com/repos/laxap/bootstrap_grids/issues/comments/209311064","html_url":"https://github.com/laxap/bootstrap_grids/issues/4#issuecomment-209311064","issue_url":"https://api.github.com/repos/laxap/bootstrap_grids/issues/4","id":209311064,"user":{"login":"timri","id":2048663,"avatar_url":"https://avatars.githubusercontent.com/u/2048663?v=3","gravatar_id":"","url":"https://api.github.com/users/timri","html_url":"https://github.com/timri","followers_url":"https://api.github.com/users/timri/followers","following_url":"https://api.github.com/users/timri/following{/other_user}","gists_url":"https://api.github.com/users/timri/gists{/gist_id}","starred_url":"https://api.github.com/users/timri/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/timri/subscriptions","organizations_url":"https://api.github.com/users/timri/orgs","repos_url":"https://api.github.com/users/timri/repos","events_url":"https://api.github.com/users/timri/events{/privacy}","received_events_url":"https://api.github.com/users/timri/received_events","type":"User","site_admin":false},"created_at":"2016-04-13T08:52:08Z","updated_at":"2016-04-13T08:52:08Z","body":"I had this problem also and found another solution:\r\nI use a queue for the append-functions, by changing the append-wrap:\r\n\r\n```\r\n# create a queue for domready-functions, since jQuery was moved to the footer:\r\npage.jsInline.1234 = TEXT\r\npage.jsInline.1234.value = var domReadyQueue = [];\r\n\r\n# append the initializers for sliders to the queue\r\n# (the default-setup triggers a \"jQuery is undefined\"-error)\r\nlib.bootstrap_grids.slider.append.wrap (\r\n<script>\r\n  domReadyQueue.push( function($) {\r\n |\r\n  });\r\n</script>\r\n)\r\n# if this is in your own template, copy the change to tt_content:\r\ntt_content.gridelements_pi1.20.10.setup.slider.append.wrap < lib.bootstrap_grids.slider.append.wrap\r\n\r\n# run the queue in the footer\r\npage.jsFooterInline.1234 = TEXT\r\npage.jsFooterInline.1234.value (\r\njQuery(function(){\r\n      while (domReadyQueue.length) {\r\n        domReadyQueue.shift()(jQuery);\r\n      }\r\n    });\r\n)\r\n```\r\nIdea is taken from http://stackoverflow.com/questions/1220956/move-jquery-to-the-end-of-body-tag\r\nThis has the advantage to keep the generated append-blocks and thus keeping the configured settings in the flexform."}}