{"action":"created","issue":{"url":"https://api.github.com/repos/jackocnr/intl-tel-input/issues/631","repository_url":"https://api.github.com/repos/jackocnr/intl-tel-input","labels_url":"https://api.github.com/repos/jackocnr/intl-tel-input/issues/631/labels{/name}","comments_url":"https://api.github.com/repos/jackocnr/intl-tel-input/issues/631/comments","events_url":"https://api.github.com/repos/jackocnr/intl-tel-input/issues/631/events","html_url":"https://github.com/jackocnr/intl-tel-input/issues/631","id":255886938,"node_id":"MDU6SXNzdWUyNTU4ODY5Mzg=","number":631,"title":"TypeError: $(…).intlTelInput is not a function","user":{"login":"ryanandrews321","id":30725451,"node_id":"MDQ6VXNlcjMwNzI1NDUx","avatar_url":"https://avatars3.githubusercontent.com/u/30725451?v=4","gravatar_id":"","url":"https://api.github.com/users/ryanandrews321","html_url":"https://github.com/ryanandrews321","followers_url":"https://api.github.com/users/ryanandrews321/followers","following_url":"https://api.github.com/users/ryanandrews321/following{/other_user}","gists_url":"https://api.github.com/users/ryanandrews321/gists{/gist_id}","starred_url":"https://api.github.com/users/ryanandrews321/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ryanandrews321/subscriptions","organizations_url":"https://api.github.com/users/ryanandrews321/orgs","repos_url":"https://api.github.com/users/ryanandrews321/repos","events_url":"https://api.github.com/users/ryanandrews321/events{/privacy}","received_events_url":"https://api.github.com/users/ryanandrews321/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":10,"created_at":"2017-09-07T10:15:57Z","updated_at":"2018-07-08T10:00:36Z","closed_at":"2017-09-07T10:29:27Z","author_association":"NONE","body":"I'm trying to use intlTelInput for a HTML registration page but I am getting the following error:\r\n`Uncaught TypeError: $(...).intlTelInput is not a function`\r\n\r\nHere is the registration view code:\r\n```\r\n\r\n<html>\r\n<head>\r\n<!-- Page for customer registration and submit details to database to associate SSO with company etc -->\r\n    <link rel=\"stylesheet\" type=\"text/css\" href=\"views/register.css\">\r\n    <script src=\"//ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js\"></script>\r\n    <link rel=\"stylesheet\" href=\"../bower_components/intl-tel-input/build/css/intlTelInput.css\">\r\n    <script src=\"../bower_components/intl-tel-input/build/js/intlTelInput.js\"></script>\r\n    <script>\r\n        $(\"#phoneNumber\").intlTelInput();\r\n\r\n        // get the country data from the plugin\r\n        var countryData = $.fn.intlTelInput.getCountryData(),\r\n            telInput = $(\"#phoneNumber\"),\r\n            addressDropdown = $(\"#country\");\r\n\r\n        // init plugin\r\n        telInput.intlTelInput({\r\n            utilsScript: \"../bower_components/intl-tel-input/build/js/utils.js\" // just for formatting/placeholders etc\r\n        });\r\n\r\n        // populate the country dropdown\r\n        $.each(countryData, function(i, country) {\r\n            addressDropdown.append($(\"<option></option>\").attr(\"value\", country.iso2).text(country.name));\r\n        });\r\n        // set it's initial value\r\n        var initialCountry = telInput.intlTelInput(\"getSelectedCountryData\").iso2;\r\n        addressDropdown.val(initialCountry);\r\n\r\n        // listen to the telephone input for changes\r\n        telInput.on(\"countrychange\", function(e, countryData) {\r\n            addressDropdown.val(countryData.iso2);\r\n        });\r\n\r\n        // listen to the address dropdown for changes\r\n        addressDropdown.change(function() {\r\n            telInput.intlTelInput(\"setCountry\", $(this).val());\r\n        });\r\n    </script>\r\n</head>\r\n\r\n<form name=\"page1\" id=\"page1\" role=\"form\">\r\n\r\n<div id=\"createCasePage1\" class=\"container-fluid\">\r\n\r\n<div class=\"col-md-6 col-xs-12\">\r\n        <div class=\"form-group\">\r\n\t      <label for=\"phoneNumber\">Phone Number:</label>\r\n          <input type=\"tel\" id=\"phoneNumber\" name=\"phoneNumber\" ng-model=\"createUserObj[0].phoneNumber\" class=\"form-control\"  required>\r\n      </div>\r\n    </div>\r\n\r\n    <div class=\"col-md-6 col-xs-12\">\r\n      <div class=\"form-group\">\r\n        <label for=\"country\">Country:</label>\r\n        <!--<input type=\"text\" id=\"country\" name=\"country\" ng-model=\"createUserObj[0].country\" class=\"form-control\" placeholder=\"Country\" required maxlength=\"100\" /> -->\r\n              <select id=\"country\" name=\"country\" ng-model=\"createUserObj[0].country\" class=\"form-control\" required></select>\r\n      </div>\r\n    </div>\r\n\r\n\r\n    <!-- Check valid  inputs and patterns then submit to controller -->\r\n    <button type=\"submit\" id=\"register\" class=\"btn btn-large\" class=\"registerBtn\" ng-click=\"page1.$valid && createUserFunc()\">Register</button>\r\n    <br>\r\n    <br>\r\n</div>\r\n</form>\r\n</html>\r\n\r\n```\r\n\r\nI think it's an issue with jQuery and Angular but I'm not really sure.\r\n"},"comment":{"url":"https://api.github.com/repos/jackocnr/intl-tel-input/issues/comments/403276499","html_url":"https://github.com/jackocnr/intl-tel-input/issues/631#issuecomment-403276499","issue_url":"https://api.github.com/repos/jackocnr/intl-tel-input/issues/631","id":403276499,"node_id":"MDEyOklzc3VlQ29tbWVudDQwMzI3NjQ5OQ==","user":{"login":"A-Sahrawat","id":40932013,"node_id":"MDQ6VXNlcjQwOTMyMDEz","avatar_url":"https://avatars0.githubusercontent.com/u/40932013?v=4","gravatar_id":"","url":"https://api.github.com/users/A-Sahrawat","html_url":"https://github.com/A-Sahrawat","followers_url":"https://api.github.com/users/A-Sahrawat/followers","following_url":"https://api.github.com/users/A-Sahrawat/following{/other_user}","gists_url":"https://api.github.com/users/A-Sahrawat/gists{/gist_id}","starred_url":"https://api.github.com/users/A-Sahrawat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/A-Sahrawat/subscriptions","organizations_url":"https://api.github.com/users/A-Sahrawat/orgs","repos_url":"https://api.github.com/users/A-Sahrawat/repos","events_url":"https://api.github.com/users/A-Sahrawat/events{/privacy}","received_events_url":"https://api.github.com/users/A-Sahrawat/received_events","type":"User","site_admin":false},"created_at":"2018-07-08T10:00:36Z","updated_at":"2018-07-08T10:00:36Z","author_association":"NONE","body":"This is the **conflict issue with existing prototype**. Try with add below line of code, hope this will help:\r\n\r\n ```\r\n<script>\r\n        jq = jQuery.noConflict();\r\n        <!-- Replace $ with jq and call intlTelInput() function ------->\r\n         use :\r\n        jq(\"#phoneNumber\").intlTelInput();\r\n        insteadof :\r\n         $(\"#phoneNumber\").intlTelInput();\r\n</script>\r\n```"}}
{"actor":{"display_login":"A-Sahrawat"}}