{"action":"created","issue":{"url":"https://api.github.com/repos/Polymer/TemplateBinding/issues/214","labels_url":"https://api.github.com/repos/Polymer/TemplateBinding/issues/214/labels{/name}","comments_url":"https://api.github.com/repos/Polymer/TemplateBinding/issues/214/comments","events_url":"https://api.github.com/repos/Polymer/TemplateBinding/issues/214/events","html_url":"https://github.com/Polymer/TemplateBinding/issues/214","id":66289614,"number":214,"title":"Unable to call Core Collapse toggle inside Template repeat Polymer","user":{"login":"microice89","id":5341312,"avatar_url":"https://avatars.githubusercontent.com/u/5341312?v=3","gravatar_id":"","url":"https://api.github.com/users/microice89","html_url":"https://github.com/microice89","followers_url":"https://api.github.com/users/microice89/followers","following_url":"https://api.github.com/users/microice89/following{/other_user}","gists_url":"https://api.github.com/users/microice89/gists{/gist_id}","starred_url":"https://api.github.com/users/microice89/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/microice89/subscriptions","organizations_url":"https://api.github.com/users/microice89/orgs","repos_url":"https://api.github.com/users/microice89/repos","events_url":"https://api.github.com/users/microice89/events{/privacy}","received_events_url":"https://api.github.com/users/microice89/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-04-04T08:08:12Z","updated_at":"2015-04-04T13:58:10Z","closed_at":null,"body":"I am trying to toggle the core collapse panel called inside repeating template element. I have provided dynamic ID to the core collapse element but on tap it says : Uncaught TypeError: boolean is not a function\r\n\r\nMy code is :\r\n\r\n    <template>\r\n    <template repeat=\"{{ data }}\">\r\n        <style>\r\n            ......\r\n        </style>\r\n        <paper-shadow z=\"1\" class=\"card\">\r\n            <span class=\"info-bar\">{{ cardID }}</span>\r\n            <div vertical layout>\r\n                <div>\r\n                    <div horizontal layout>\r\n                        <div flex style=\"color:#757575;\">\r\n                            <span>Date : </span><br /><span>March 15, 2015</span>\r\n                        </div>\r\n                        <div style=\"text-align:right;\">\r\n                            <paper-icon-button flex icon=\"subject\" style=\"color:#ed485c;\" on-tap=\"{{ toggle }}\" id=\"{{ cardID }}\"></paper-icon-button>\r\n                            <paper-icon-button flex icon=\"social:share\" title=\"clear\" style=\"color:#ed485c;\"></paper-icon-button>\r\n                        </div>\r\n                    </div>\r\n                </div>\r\n                <core-collapse id=\"{{ cardID }}\">\r\n                    <span> Collapse Content </span>\r\n                </core-collapse>\r\n            </div>\r\n        </paper-shadow>\r\n    </template>\r\n</template>\r\n\r\n\r\nMy script is :\r\n\r\n    <script>\r\n    Polymer('i-card', {\r\n        toggle: function (e, detail, sender) {\r\n            var iid = e.target.templateInstance.model.cardID;\r\n            this.shadowRoot.querySelector('#' + iid).toggle();\r\n        },\r\n        ready: function () {\r\n            this.data = this.getData();\r\n        },\r\n        getData: function () {\r\n            var data = [];\r\n            for (var i = 0; i < 100; i++) {\r\n                data.push({\r\n                    cardID : 'icard-' + Math.floor(Math.random()*(1000-1+1)+1),\r\n                });\r\n            }\r\n            return data;\r\n        }\r\n    });\r\n</script>\r\n\r\n\r\n\r\nI need to toggle their respective collapse element on tap."},"comment":{"url":"https://api.github.com/repos/Polymer/TemplateBinding/issues/comments/89582047","html_url":"https://github.com/Polymer/TemplateBinding/issues/214#issuecomment-89582047","issue_url":"https://api.github.com/repos/Polymer/TemplateBinding/issues/214","id":89582047,"user":{"login":"jongeho1","id":251154,"avatar_url":"https://avatars.githubusercontent.com/u/251154?v=3","gravatar_id":"","url":"https://api.github.com/users/jongeho1","html_url":"https://github.com/jongeho1","followers_url":"https://api.github.com/users/jongeho1/followers","following_url":"https://api.github.com/users/jongeho1/following{/other_user}","gists_url":"https://api.github.com/users/jongeho1/gists{/gist_id}","starred_url":"https://api.github.com/users/jongeho1/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jongeho1/subscriptions","organizations_url":"https://api.github.com/users/jongeho1/orgs","repos_url":"https://api.github.com/users/jongeho1/repos","events_url":"https://api.github.com/users/jongeho1/events{/privacy}","received_events_url":"https://api.github.com/users/jongeho1/received_events","type":"User","site_admin":false},"created_at":"2015-04-04T13:58:09Z","updated_at":"2015-04-04T13:58:09Z","body":"@microice89  - you scared me! i hope this isn't a bug and you may get directed to stackoverflow! Perhaps you are running into an id namespace collision since you are using the same id for your paper-button and core-collapse instance for each data item. \r\n\r\nDefinitely use chrome dev tools and debug your source:\r\n\r\n![screen shot 2015-04-04 at 9 18 46 am](https://cloud.githubusercontent.com/assets/251154/6992784/f77b4e0e-daab-11e4-9b3d-8b6fbc89d699.png)\r\n\r\nRemoving the \"id\" attribute of your paper-button or simply changing it seemed to allow your code to work!\r\n\r\nThanks,\r\n@jongeho1\r\n           \r\n"}}