⚠ In case you've missed it, we have migrated to our new website, with a brand new forum. For more details about the migration you can read our blog post for website migration. This is an archived forum. ⚠

  •     

profile picture

Grocery Crud + jquery bootstrap don't work together



AlbertoBedo

AlbertoBedo
  • profile picture
  • Member

Posted 01 December 2016 - 17:39 PM

Hello,

 

- If I only use Grocery Crud it works

 

- If I use my graphic template for the website created with bootstrap+jquery, Grocery Crud does not work anymore.

 

The problem is that jQuery library are inserted 2 times and so the second time all variables are cleared.

 

See this: /topic/1544-successful-insertion-results-in-text-area-instead-of-success-message/#entry6687

And also this: /topic/2776-uncaught-typeerror-undefined-is-not-a-function/

 

GC includes these files:

<link type="text/css" rel="stylesheet" href="[my-website]/assets/grocery_crud/themes/flexigrid/css/flexigrid.css" /><link type="text/css" rel="stylesheet" href="[my-website]/assets/grocery_crud/css/jquery_plugins/fancybox/jquery.fancybox.css" />
<link type="text/css" rel="stylesheet" href="[my-website]/assets/grocery_crud/css/ui/simple/jquery-ui-1.10.1.custom.min.css" />
<script src="[my-website]/assets/grocery_crud/js/jquery-1.11.1.min.js"></script>
<script src="[my-website]/assets/grocery_crud/js/jquery_plugins/jquery.noty.js"></script>
<script src="[my-website]/assets/grocery_crud/js/jquery_plugins/config/jquery.noty.config.js"></script>
<script src="[my-website]/assets/grocery_crud/js/common/lazyload-min.js"></script>
<script src="[my-website]/assets/grocery_crud/js/common/list.js"></script>
<script src="[my-website]/assets/grocery_crud/themes/flexigrid/js/cookies.js"></script>
<script src="[my-website]/assets/grocery_crud/themes/flexigrid/js/flexigrid.js"></script>
<script src="[my-website]/assets/grocery_crud/js/jquery_plugins/jquery.form.min.js"></script>
<script src="[my-website]/assets/grocery_crud/js/jquery_plugins/jquery.numeric.min.js"></script>
<script src="[my-website]/assets/grocery_crud/themes/flexigrid/js/jquery.printElement.min.js"></script>
<script src="[my-website]/assets/grocery_crud/js/jquery_plugins/jquery.fancybox-1.3.4.js"></script>
<script src="[my-website]/assets/grocery_crud/js/jquery_plugins/jquery.easing-1.3.pack.js"></script>
<script src="[my-website]/assets/grocery_crud/js/jquery_plugins/ui/jquery-ui-1.10.3.custom.min.js"></script>
 
While my bootstrap template includes:
 
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
<script>window.jQuery || document.write('<script src=\"http://[my-website]/js/vendor/jquery.min.js\"><\/script>')</script>
<script src="[my-website]/js/bootstrap.min.js"></script>
<!-- IE10 viewport hack for Surface/desktop Windows 8 bug -->
 <script src="[my-website]/js/ie10-viewport-bug-workaround.js"></script>
 

How can I avoid this conflict? I think that GC should use jQuery from bootstrap but I don't know which files should I exclude, and how can I tell it to use the other js.

 

This should be a quite diffuse problem.

 

Thank you

Alberto