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

Ajax doesn't work. #58

Open
Cleopatria opened this issue May 30, 2016 · 5 comments
Open

Ajax doesn't work. #58

Cleopatria opened this issue May 30, 2016 · 5 comments

Comments

@Cleopatria
Copy link

This plugin's great.. but I wonder how to implement this plugin with ajax. I tried using this code

<script> $('.mentions').mentionsInput({source: 'data.json'}) </script>

data.json
[ {value: 'alex', uid: 'user:1'}, {value: 'andrew', uid: 'user:2'}, {value: 'angry birds', uid: 'game:5'}, {value: 'assault', uid: 'game:3'} ]

but those name didn't appear.

How to fix it?

@ivirabyan
Copy link
Owner

You'd better pass absolute path to data.json file, like /path/to/data.json.

@Cleopatria
Copy link
Author

So.. I have to make folder named path?

@ivirabyan
Copy link
Owner

that's not necessary, if it's on your root directory, just pass '/data.json'

@Cleopatria
Copy link
Author

Cleopatria commented Jun 17, 2016

Thank you for responding, I've tried to use /path/to/data.json but it's not working.

@ivirabyan
Copy link
Owner

@Cleopatria, what's the exact uri to your data.json?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants
@ivirabyan @Cleopatria and others