{"action":"opened","issue":{"url":"https://api.github.com/repos/PolymerElements/polymer-starter-kit/issues/591","labels_url":"https://api.github.com/repos/PolymerElements/polymer-starter-kit/issues/591/labels{/name}","comments_url":"https://api.github.com/repos/PolymerElements/polymer-starter-kit/issues/591/comments","events_url":"https://api.github.com/repos/PolymerElements/polymer-starter-kit/issues/591/events","html_url":"https://github.com/PolymerElements/polymer-starter-kit/issues/591","id":122055230,"number":591,"title":"How to integrate Knob + Polymer 1.0 + Custom Script?","user":{"login":"TheRod1990","id":16024060,"avatar_url":"https://avatars.githubusercontent.com/u/16024060?v=3","gravatar_id":"","url":"https://api.github.com/users/TheRod1990","html_url":"https://github.com/TheRod1990","followers_url":"https://api.github.com/users/TheRod1990/followers","following_url":"https://api.github.com/users/TheRod1990/following{/other_user}","gists_url":"https://api.github.com/users/TheRod1990/gists{/gist_id}","starred_url":"https://api.github.com/users/TheRod1990/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TheRod1990/subscriptions","organizations_url":"https://api.github.com/users/TheRod1990/orgs","repos_url":"https://api.github.com/users/TheRod1990/repos","events_url":"https://api.github.com/users/TheRod1990/events{/privacy}","received_events_url":"https://api.github.com/users/TheRod1990/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-12-14T14:39:23Z","updated_at":"2015-12-14T14:39:23Z","closed_at":null,"body":"Hi, im new in Polymer & Java. Right now im trying to set up a site which is build of Polymer 1.0, a custom java script (https://github.com/ztizzlegaming/CSGOWinBig/blob/master/src/script.js) and Knob.js by aterrien (https://github.com/aterrien/jQuery-Knob). There is a countdown function in the script i want to use to dynamicly change the Knob of jQuery-Knob.js.\r\n\r\nThe Countdown Part in the custom script:\r\n\r\n    var mTimeLeft = 120;\r\n    var timerRunning = false;\r\n    function timer (timeLeft) {\r\n    if (!timerRunning || timeLeft <= 0) {\r\n    timerRunning = false;\r\n    return;\r\n    }\r\n\r\n    if (timeLeft !== undefined) {\r\n    mTimeLeft = timeLeft;\r\n    }\r\n\r\n    //Set something on the page to show the time left\r\n    $('#time-left').text(parseInt(mTimeLeft) + 's');\r\n\r\n    mTimeLeft--;\r\n\r\n    if (mTimeLeft <= 0) {\r\n    timerRunning = false;\r\n    return;\r\n    }\r\n\r\n    setTimeout(timer, 1000);\r\n    }\r\n\r\nAnd here is my Knob function, which i set up as a Polymer Webcomponent (knob.html):\r\n\r\n    <link rel=\"import\" href=\"bower_components/polymer/polymer.html\">\r\n\r\n\r\n    <dom-module id=\"knob\">\r\n    <style>\r\n\r\n    </style>\r\n    <template>\r\n     <input type=\"text\" value=\"60\" id=\"dial\" data-width=\"200\">\r\n    </template>\r\n    </dom-module>\r\n\r\n    <script type=\"application/javascript\">\r\n    Polymer ({\r\n    is: \"knob\",\r\n\r\n     ready: function() {\r\n        $(this.$.dial).knob({\r\n            'min':0,\r\n            'max':120,\r\n            }\r\n        );\r\n     }\r\n\r\n\r\n    });\r\n    </script>\r\n\r\nSo the Custom Script is directly called in index.html of Polymer, where i called the Knob.js aswell:\r\n\r\n    <script src=\"https://code.jquery.com/jquery-2.1.4.js\"></script>\r\n    <script src=\"bower_components/aterrien/jQuery-Knob/js/jquery.knob.js\"></script>\r\n\r\nand\r\n\r\n    <paper-card elevation=\"1\" class=\"pot\"> \r\n     <knob></knob>\r\n    </paper-card>\r\n\r\nIm sitting on this since hours… does anybody have an idea?"}}