Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

$(...).intlTelInput is not a function #54

Open
i-panov opened this issue Oct 29, 2018 · 11 comments
Open

$(...).intlTelInput is not a function #54

i-panov opened this issue Oct 29, 2018 · 11 comments
Assignees
Labels

Comments

@i-panov
Copy link

i-panov commented Oct 29, 2018

  1. JQuery included in header (by default in yii)

header

  1. intlTelInput.min.js included after footer and after it the handler is registered.

console

An error occurs on the handler registration line: $('#account-phone').intlTelInput();

error

I can not understand why this is happening? Help me please!

@i-panov
Copy link
Author

i-panov commented Oct 29, 2018

I understood what was the matter! It looks like a bug! PhoneInputAsset is not included intlTelInput-jquery.min.js. Including it manually corrected the situation (the widget was displayed), but this is not a solution. Please add it because it is obviously a bug!!!

@i-panov
Copy link
Author

i-panov commented Nov 8, 2018

@Borales Will you react to this? Or should I start looking for another solution? I already wrote you a pull request, but you ignore me.

@Borales
Copy link
Owner

Borales commented Nov 8, 2018

@i-panov Hi, sorry for the delay. Thank you for your PR, I posted a comment for it.

@Buliwyfa
Copy link

Having the same issue with the last version.

i-panov path fix it!!

The fix:

src/PhoneInputAsset.php

public $js = [
    'build/js/utils.js',
    'build/js/intlTelInput.min.js',
    'build/js/intlTelInput-jquery.min.js',  <------------ ADD THIS
@alireza-salehi
Copy link

they have removed jquery dependency on main file, you have to include jquery version in PhoneInputAsset

@andrey-denisenko
Copy link

Issue appeared a year ago. And it still there!

@Borales
Copy link
Owner

Borales commented Oct 17, 2019

@andrey-denisenko @alireza-salehi please check 0.3.0 release

@Eseperio
Copy link

Please update Packagist to reflect 0.3.0 tag

@Spell6inder
Copy link
Contributor

@Borales
maybe something went wrong with the GitHub Hook - latest version on packagist.org is 0.2.1
https://packagist.org/packages/borales/yii2-phone-input
https://packagist.org/about#how-to-update-packages

@Borales
Copy link
Owner

Borales commented Oct 18, 2019

apologies, I had to upgrade Packagist webhooks, it's ok now

@nnrudakov
Copy link

0.3.0 tag doesn't contains @i-panov's fix. It works only with .min version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
8 participants