Javascript Double Load
Permalink Browser Info Environment
Hi,
im doing to local trials and having trouble with the javascript loading two times on the page. The problem i found is the script in the element/footer.php
<?php if ($u -> isLoggedIn ()): ?>
$(document).ready(function() {
$('nav#mobile-menu').mmenu();
configuration: {
selectedClass: "active"
}
});
<?php else: ?>
var tpj=jQuery;
tpj(document).ready(function() {
tpj('nav#mobile-menu').mmenu();
configuration: {
selectedClass: "active"
}
<?php endif; ?>
Have you had any similar experience or problem with that?
im doing to local trials and having trouble with the javascript loading two times on the page. The problem i found is the script in the element/footer.php
<?php if ($u -> isLoggedIn ()): ?>
$(document).ready(function() {
$('nav#mobile-menu').mmenu();
configuration: {
selectedClass: "active"
}
});
<?php else: ?>
var tpj=jQuery;
tpj(document).ready(function() {
tpj('nav#mobile-menu').mmenu();
configuration: {
selectedClass: "active"
}
<?php endif; ?>
Have you had any similar experience or problem with that?
Type: | Discussion |
---|---|
Status: | In Progress |
Best Regards,
David