Web Design Forum  
 
Go Back   Web Design Forum > Web Software > Scripts

Reply
 
LinkBack Thread Tools Display Modes
Old 01-12-2012, 08:41 AM   #1
New Member
 
Join Date: Jan 2012
Location: London
Posts: 3
Default Clashing JQuery

Hey guys,

I have a problem I'm trying to run 2 JQuery functions on my site:
1. Nivo slideshow
2. Show and Hide

Both scripts run perfectly on their own but when I add the both to xhtml only the slideshow runs.

Both scripts are below as in my code (any help greatly appreciated):


<!--JQUERY_SHOW_&_HIDE----------------------------------------------------------------------------------------->

<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.6.4/jquery.min.js" type="text/javascript"></script>
<script src="showHide.js" type="text/javascript"></script>
<script type="text/javascript">

$(document).ready(function(){


$('.show_hide').showHide({
speed: 1000, // speed you want the toggle to happen
easing: '', // the animation effect you want. Remove this line if you dont want an effect and if you haven't included jQuery UI
changeText: 0, // if you dont want the button text to change, set this to 0
showText: 'View',// the button text to show when a div is closed
hideText: 'Close' // the button text to show when a div is open

});


});

</script>

<!--JQUERY_SHOW_&_HIDE_END--------------------------------------------------------------------------------------->

<!--JQUERY_SLIDESHOW--------------------------------------------------------------------------------------------->

<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.js" type="text/javascript"></script>
02
<script type="text/javascript">
03

04
$(document).ready(function(){
05

06
$(".slidingDiv").hide();
07
$(".show_hide").show();
08

09
$('.show_hide').click(function(){
10
$(".slidingDiv").slideToggle();
11
});
12

13
});
14

15
</script>

<script type="text/javascript" src="jquery-1.6.1.min.js"></script>
<script type="text/javascript" src="jquery.nivo.slider.pack.js"></script>
<script type="text/javascript">
$(window).load(function() {
$('#slider').nivoSlider();
});
</script>
<!--JQUERY_SLIDESHOW_END--------------------------------------------------------------------------------------------->
TheHive is offline   Reply With Quote


Old 01-12-2012, 01:09 PM   #2
Gold Member
 
conor's Avatar
 
Join Date: Oct 2008
Location: Ireland
Posts: 349
Default

It could have something to do with the fact that your loading 3 different versions of jQuery at once. Remove these lines:

Code:
<script type="text/javascript" src="jquery-1.6.1.min.js"></script>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.js" type="text/javascript"></script>
leave the call to load 1.6.4 and it should work
__________________
Conor
conor is offline   Reply With Quote
Old 01-14-2012, 10:44 PM   #3
New Member
 
Join Date: Jan 2012
Location: London
Posts: 3
Default

Hey Conor,

Makes perfect sense.

Thanks mate!
TheHive is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT. The time now is 11:31 AM.


Camera Forum - Computer Forum - Web Design Forum

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2012, vBulletin Solutions, Inc.
Content Relevant URLs by vBSEO 3.6.0 ©2011, Crawlability, Inc.