1
I’m having a jQuery conflict. I use an Admin, where there are several resources ready. I needed to add an autocomplete
When after I finished I realized that the menu was no longer opening...
This is the menu and all Admin
<script src="assets/js/jquery-ui-1.10.3.custom.min.js"></script>
This is the autocomplete
<script src="http://code.jquery.com/ui/1.10.3/jquery-ui.js"></script>
Code of the Autocomplete
$(function() {
var availableTags = [
<?php do { ?>
{label: '<?php echo $row_rsOrigem['rsocial']; ?> - <?php echo $row_rsOrigem['cpf_cnpj']; ?>', value: '<?php echo $row_rsOrigem['cpf_cnpj']; ?>'},
<?php } while ($row_rsOrigem = mysql_fetch_assoc($rsOrigem));?>
];
$(".origemCPF").autocomplete({
source: availableTags
});
});
It is possible to use both, without having problems between them?
Remove one of them, which appears second.
– Sergio
@Sergio I did it, but if I take one, the other one stops working.
– Tiago
Error in browser console when trying to open MENU ?
– Diego Souza
Since the first one is custom, it may not contain what is needed for the autocomplete. Just leave jQuery-ui complete to test.
– Luis Henrique
@Diegosouza no error appears. I click on the menu it goes down and up again. No fixed to click.
– Tiago
@Luishenrique I made the exchange. I put one and then the other. But always one is not working.
– Tiago
Tiago: you have to take one, you really have to do it. Then you have to understand why it makes mistakes. Do you have it online? Can you show the link? What role did you move to make it work? Was it a scope problem? For in the code you have in question that function
filterArrayForString
is locked inside a scope and I don’t see it being called in that scope which means it’s not possible to use it...– Sergio
@Sergio I’m testing on localhost. I removed the
filterArrayForString
and yet I didn’t get better.– Tiago
What a mistake on the console?
– Sergio