2
I have an AJAX system in PHP and I have an index.php where I have all src js included:
<head>
<link rel="stylesheet" href="/assets/fileinput/css/fileinput.min.css" media="all" type="text/css" />
<script src="/assets/plugins/jQuery/jQuery-2.1.4.min.js"></script>
<script src="/assets/fileinput/js/plugins/canvas-to-blob.min.js" type="text/javascript"></script>
<script src="/assets/fileinput/js/fileinput.js" type="text/javascript"></script>
<script src="/assets/fileinput/js/fileinput_locale_pt-BR.js"></script>
</head>
And I load other php pages in the same index.php with jquery div load, for example:
$('#div'). load("page.php",{foo : bar});
The page.php page is loaded into the div correctly, but when I call a fileinput class for example the system does not understand, as if I was not declared js src’s
<input id="foto" name="foto" type="file" multiple class="file-loading">
I think that any other jQuery function that calls some js plugin would not find tb, fileinput is just an example. If I declare js src, Styles on page.php the system runs correctly, but I will be declaring 2 times the same thing. Would you have some way of doing that by declaring once only?
Interesting, I get the concept of it. Thanks a lot for the help, I’ll give a read on the fileinput doc, I would have a few more arguments to work the way I want, but that’s what you said. Was worth too much!
– Gustavo Carvalho