Dual scripts in head - Post ID 252945
Is it possible to have 2 javascripts in the "head" tags?
When I put them in both my scripts stop working.
I have 2 scripts to run on a specific page.....
1. Slideshow for the top
2. Image viewer for photos
You can see an example here... http://trentonems.com/staff.php Of it not allowing the sideshow to start (just hangs up at first photo) and the thumbnail viewer is not opening up the thumbnails properly into their full size
When I put them in both my scripts stop working.
I have 2 scripts to run on a specific page.....
1. Slideshow for the top
2. Image viewer for photos
You can see an example here... http://trentonems.com/staff.php Of it not allowing the sideshow to start (just hangs up at first photo) and the thumbnail viewer is not opening up the thumbnails properly into their full size
Here is the code I am using
ANy help would be appreciated
ANy help would be appreciated
<head>
<title>Trenton EMS</title>
<meta name="Description" content="Trenton Emergency Medical Service is located in the Capital City of Trenton in NJ and provides emergency medical care to the residents and visitors to the city of Trenton">
<meta name="KeyWords" content="tems,trenton,emergency,medical,service,ems,nj,new jersey">
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<link rel="stylesheet" type="text/css" href="css/style.css" />
<link rel="stylesheet" href="image_viewer/lightbox.css" type="text/css" media="screen" />
<script type="text/javascript" src="image_viewer/js/prototype.js"></script>
<script type="text/javascript" src="image_viewer/js/scriptaculous.js?load=effects"></script>
<script type="text/javascript" src="image_viewer/js/lightbox.js"></script>
<script type="text/javascript" src="js/jquery.min.js"></script>
<script type="text/javascript" src="js/jquery.easing.min.js"></script>
<script type="text/javascript" src="js/jquery.nivo.slider.pack.js"></script>
<script type="text/javascript">
$(window).load(function() {
$('#slider').nivoSlider();
});
</script>
</head>
<title>Trenton EMS</title>
<meta name="Description" content="Trenton Emergency Medical Service is located in the Capital City of Trenton in NJ and provides emergency medical care to the residents and visitors to the city of Trenton">
<meta name="KeyWords" content="tems,trenton,emergency,medical,service,ems,nj,new jersey">
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<link rel="stylesheet" type="text/css" href="css/style.css" />
<link rel="stylesheet" href="image_viewer/lightbox.css" type="text/css" media="screen" />
<script type="text/javascript" src="image_viewer/js/prototype.js"></script>
<script type="text/javascript" src="image_viewer/js/scriptaculous.js?load=effects"></script>
<script type="text/javascript" src="image_viewer/js/lightbox.js"></script>
<script type="text/javascript" src="js/jquery.min.js"></script>
<script type="text/javascript" src="js/jquery.easing.min.js"></script>
<script type="text/javascript" src="js/jquery.nivo.slider.pack.js"></script>
<script type="text/javascript">
$(window).load(function() {
$('#slider').nivoSlider();
});
</script>
</head>
Your having a script conflict. You can use several scripts has long as they don't conflict.
I can't hear what I'm looking at.
It's easy to overlook something you're not looking for.
This is a site I built for my work.(RSD)
http://esmansgreenhouse.com
This is a site I built for use in my job.(HTML Editor)
https://pestlogbook.com
This is my personal site used for testing and as an easy way to share photos.(RLM imported to RSD)
https://ericrohloff.com
It's easy to overlook something you're not looking for.
This is a site I built for my work.(RSD)
http://esmansgreenhouse.com
This is a site I built for use in my job.(HTML Editor)
https://pestlogbook.com
This is my personal site used for testing and as an easy way to share photos.(RLM imported to RSD)
https://ericrohloff.com
Any idea how to fix
Try replacing this,
with this,
<script type="text/javascript">
$(window).load(function() {
$('#slider').nivoSlider();
});
</script>
$(window).load(function() {
$('#slider').nivoSlider();
});
</script>
with this,
<script type="text/javascript">
var jQ = $.noConflict(true);
jQ(window).load(function() {
jQ('#slider').nivoSlider();
});
</script>
var jQ = $.noConflict(true);
jQ(window).load(function() {
jQ('#slider').nivoSlider();
});
</script>
I can't hear what I'm looking at.
It's easy to overlook something you're not looking for.
This is a site I built for my work.(RSD)
http://esmansgreenhouse.com
This is a site I built for use in my job.(HTML Editor)
https://pestlogbook.com
This is my personal site used for testing and as an easy way to share photos.(RLM imported to RSD)
https://ericrohloff.com
It's easy to overlook something you're not looking for.
This is a site I built for my work.(RSD)
http://esmansgreenhouse.com
This is a site I built for use in my job.(HTML Editor)
https://pestlogbook.com
This is my personal site used for testing and as an easy way to share photos.(RLM imported to RSD)
https://ericrohloff.com
Thanks Eric ..... that a start. Just changed it and it allows the thumbnail viewer script to work properly now but the slideshow at the top is still stuck on the first image. If you click on one of the other pages of the site you can see how the images transition but on the staff page it doesnt. At least for now I have the photo viewer working properly
Have something to add? We’d love to hear it!
You must have an account to participate. Please Sign In Here, then join the conversation.