Hello!
I declare function in extern js file:
$(function () {
$('[data-provide=typeahead]').each(function () {
var self = $(this);
self.typeahead({
source: function (term, process) {
var url = self.data('url');
console.log(url);
return $.getJSON(url, { term: term }, function (data) {
return process(data);
});
}
});
});
});
But it doesn't works. After step to the function, it doesn't go on to bypass the content.
Telling link on partial master page:
...
<script src="~/Scripts/Login.js?v.3.0"></script>
...
<div class="container">
@RenderBody()
</div>
...
It start to work only if I'm placed this code directly on page.
What's a problem?
Thanks!