some joomla modules not working with different jquery versions conflicts in my custom template, how to solve it? -
i have designed joomla 3 custom template zurb foundation framework, think due jquery conflicts modules working latest , light box gallery not working @ jquery noconflict code.
this custom template index.php data
?php /** * @copyright copyright (c) 2013 enter infolabs - rights reserved. **/ defined( '_jexec' ) or die( 'restricted access' ); define( 'yourbasepath', dirname(__file__) ); jhtml::_('behavior.framework', true); $app = jfactory::getapplication(); $doc = jfactory::getdocument(); $doc->addscript('templates/' .$this->template. '/js/vendor/jquery.js'); $rightcolgrid = "3"; ?> <!doctype html> <html class="no-js" xmlns="http://www.w3.org/1999/xhtml" xml:lang="<?php echo $this->language; ?>" lang="<?php echo $this->language; ?>" dir="<?php echo $this->direction; ?>"> <head> <jdoc:include type="head" /> <meta charset="utf-8" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" /> <link rel="icon" href="<?php echo $this->baseurl ?>/templates/<?php echo $this->template ?>/images/favicon.ico" type="image/png"> <link rel="stylesheet" href="<?php echo $this->baseurl ?>/templates/<?php echo $this->template ?>/css/template.css" type="text/css"/> <link rel="stylesheet" href="<?php echo $this->baseurl ?>/templates/<?php echo $this->template ?>/css/foundation.css" /> <link rel="stylesheet" href="<?php echo $this->baseurl ?>/templates/system/css/system.css" type="text/css" /> <link rel="stylesheet" href="<?php echo $this->baseurl ?>/templates/system/css/general.css" type="text/css" /> <link rel="stylesheet" href="<?php echo $this->baseurl ?>/templates/<?php echo $this->template ?>/css/style.css" type="text/css"/> <link href='http://fonts.googleapis.com/css?family=bubbler+one|maven+pro' rel='stylesheet' type='text/css'> <link rel="stylesheet" href="<?php echo $this->baseurl ?>/templates/<?php echo $this->template ?>/css/foundation-icons.css" /> <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script> baseurl ?>/templates/template ?>/js/jquery-noconflict.js"> <!-- [if ie]><link rel="stylesheet" href="<?php echo $this->baseurl ?>/templates/<?php echo $this->template ?>/css/ie.css" media="screen, projection" /><![endif]--> </head> <body> ------------------- ---------------- ----------------- <script src="<?php echo $this->baseurl ?>/templates/<?php echo $this->template ?>/js/foundation/foundation.topbar.js"></script> <script src="<?php echo $this->baseurl ?>/templates/<?php echo $this->template ?>/js/foundation.min.js"></script> <script src="<?php echo $this->baseurl ?>/templates/<?php echo $this->template ?>/js/vendor/jquery.js"></script> baseurl ?>/templates/template ?>/js/jquery-noconflict.js"> <script> $(document).foundation(); </script> </body> </html> can solve issue pls.
besides ensuring load jquery once (as @lodder pointed out) have noconflict() call, un-assign $ shorthand. make
$(document).foundation()
fail. should replace
jquery(document).foundation()
have looked @ siegeengine's port of foundation joomla? save headaches; while has same issue noconflict , invoking foundation shorthand $, might help.
also, why not load jquery off cdn?
Comments
Post a Comment