I'm not able to call a javascript function from a file. Ex:
File: javascript
within folder raiz/scripts/javascript.js
function responsivo () {
$('#responsivo').popover({
//trigger: 'manual',
placement: 'bottom',
html: true,
title: 'O que é um site ou software responsivo?',
content: $('#Responsivo').html()
}).popover("show");
};
view
that is in the raiz/views/home/Index.cshtml
folder
<h3 class="div1Texto2">Sites, Softwares e Lojas Virtuais 100% integrados e <span id="responsivo">responsivos</span></h3>
tag in head
tag:
<script src="~/Scripts/javascript.js"></script>
When I rotate the page it does not work, however if I put that function on the page it works normally.
I tried to do this too, but it did not work:
<script type="text/javascript">
responsivo();
</script>
obs: I was able to call putting onload="responsive ()" in the tag, but if you have many functions like this?