I asked a question on this recently and I was given the suggestion of separating the jquery code into their individual library using the following code.
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
<script>
//code that uses 1.10.2 should be enclosed as follows right after loading 1.10.2
jQuery(function( $ ) {
//1.10.2 code goes here
});
</script>
<script src="js/jquery-1.4.4.min.js"></script>
<script>
//code that uses 1.4.4 should be enclosed as follows
jQuery(function( $ ) {
//1.4.4 code goes here
});
</script>
This worked fine for the Index page but it doesn't seem to be working for other pages. I am using the 'Reveal Modal' and 'magnific-popup'. I have them both set up in their individual jquery libraries however they still seem to be conflicting. The page in question is mike-griffin.com/ronald_joyce.html. the 'Reveal Modal' fires when the "our Designers" link is clicked and the 'magnific-popup' lightbox should fire when and image on the page is clicked but it doesn't... But if I delete the "jquery-1.4.4.min.js" library it fires fine but the 'Reveal Modal' stops working. Code is listed below...
<script src="js/jquery-1.10.2.min.js"></script>
<script>
//code that uses 1.10.2 should be enclosed as follows right after loading 1.10.2
jQuery(function( $ ) {
$(document).ready(function() {
$('.image-link').magnificPopup({type:'image'});
});
$('.thumbnail-contaner').magnificPopup({
delegate: 'a', // child items selector, by clicking on it popup will open
type: 'image'
// other options
});
});
</script>
<script src="js/jquery-1.4.4.min.js"></script>
<script>
//code that uses 1.4.4 should be enclosed as follows
jQuery(function( $ ) {
$.backstretch("img/Background img/Zoe-10-Background.jpg" , {duration: 3000, fade: 1000});
$('#main-nav-modal').reveal({
animation: 'fadeAndPop', //fade, fadeAndPop, none
animationspeed: 300, //how fast animtions are
closeonbackgroundclick: true, //if you click background will modal close?
dismissmodalclass: 'close-reveal-modal' //the class of a button or element that will close an open modal
});
$('#sale-nav-modal').reveal({
animation: 'fadeAndPop', //fade, fadeAndPop, none
animationspeed: 300, //how fast animtions are
closeonbackgroundclick: true, //if you click background will modal close?
dismissmodalclass: 'close-reveal-modal' //the class of a button or element that will close an open modal
});
});
</script>
Any help is much appreciated and thanks if you read this far but couldn't help.