Jquery Mobile conflict
Permalink
Hi all, I am making a theme using Jquery Mobile
Package Temp of header.php:-
<?php defined('C5_EXECUTE') or die(_("Access Denied.")); ?>
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1">
<style type="text/css">@import"<?php echo $this->getStyleSheet('css/jquery.mobile-1.2.0.min.css')?>";</style>
<script type="text/javascript" src="<?php echo $this->getThemePath()?>/js/jquery-1.8.2.min.js"></script>
<script type="text/javascript" src="<?php echo $this->getThemePath()?>/js/jquery.mobile-1.2.0.min.js"></script>
</head>
<?php Loader::element('header_required'); ?>
That's problem with new area add. It's conflict by Jquery mobile
How can fix this?
Package Temp of header.php:-
<?php defined('C5_EXECUTE') or die(_("Access Denied.")); ?>
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1">
<style type="text/css">@import"<?php echo $this->getStyleSheet('css/jquery.mobile-1.2.0.min.css')?>";</style>
<script type="text/javascript" src="<?php echo $this->getThemePath()?>/js/jquery-1.8.2.min.js"></script>
<script type="text/javascript" src="<?php echo $this->getThemePath()?>/js/jquery.mobile-1.2.0.min.js"></script>
</head>
<?php Loader::element('header_required'); ?>
That's problem with new area add. It's conflict by Jquery mobile
How can fix this?
The below code is working with new area add and update but for without a view of jQuery Mobile's widget as this for temporary till fixed.
<?php if(!$c->isEditMode()) { ?>
<script type="text/javascript" src="<?php echo $this->getThemePath()?>/js/jquery-1.8.2.min.js"></script>
<?php }?>
<?php if(!$c->isEditMode()) { ?>
<script type="text/javascript" src="<?php echo $this->getThemePath()?>/js/jquery-1.8.2.min.js"></script>
<?php }?>
Any help at all would be greatly appreciated. Thank you!
jQuery is automatically included in c5, so you don't need to include it yourself. However, the current version included is 1.7.1.
Having duplicate jQuery instances on your site will give you unexpected results and clashing scripts.
Also you need to make sure the code below is inside the <head> section (that is move it above </head>):
Having duplicate jQuery instances on your site will give you unexpected results and clashing scripts.
Also you need to make sure the code below is inside the <head> section (that is move it above </head>):
<?php Loader::element('header_required'); ?>
Thanks adajad. I have checked the current version. It is 1.6.2 now. I will get to new update.
Uncaught Error: Syntax error, unrecognized expression: #ccm-form-submit-button').get(0).click() jquery-1.8.2.min.js:2
[jquery.form] state = complete jquery.form.js:902
[jquery.form] isXml=false jquery.form.js:902