...

View Full Version : Another problem with two jquery plugins in a page



Belen
03-14-2011, 09:01 AM
I have the jquery.lightbox-0.5.js and the jquery.easing.1.3.js in a page and only manage to get one work. I have tried several solutions I had found on the internet but without results. I would really appreciate your help. Thanks.

The original code is:

<link rel="stylesheet" type="text/css" href="css/jquery.lightbox-0.5.css" media="screen" />
<script type="text/javascript"src="js/jquery.js"></script>

<script type="text/javascript" src="js/jquery.lightbox-0.5.js"></script>


<script type="text/javascript">
$(function() {
// Use this example, or...
$('#mygallery a').lightBox({fixedNavigation:true});
});


</script>

<!--Make sure page contains valid doctype at the very top!-->

<script type="text/javascript" src="js/jquery.min.js"></script>

<script type="text/javascript" src="js/stepcarousel.js"></script>


<script type="text/javascript">

stepcarousel.setup({
galleryid: 'mygallery', //id of carousel DIV
beltclass: 'belt', //class of inner "belt" DIV containing all the panel DIVs
panelclass: 'panel', //class of panel DIVs each holding content
/* autostep: {enable:true, moveby:1, pause:3000},
*/ panelbehavior: {speed:500, wraparound:true, wrapbehavior:'pushpull', persist:false},
defaultbuttons: {enable: true, moveby: 1, leftnav: ['images/leftnav.gif', -35, 50], rightnav: ['images/rightnav.gif', 10, 50]},
statusvars: ['statusA', 'statusB', 'statusC'], //register 3 variables that contain current panel (start), current panel (last), and total panels
contenttype: ['inline'] //content setting ['inline'] or ['ajax', 'path_to_external_file']
})

</script>


</head>
<body>



<!-- Site JavaScript -->
<script type="text/javascript" src="js/jquery-1.3.1.min.js"></script>
<script type="text/javascript" src="js/jquery.easing.1.3.js"></script>
<script type="text/javascript" src="js/jquery.ennui.contentslider.js"></script>
<script type="text/javascript">
$(function() {
$('#one').ContentSlider({
width : '920px',
height : '200px',
speed : 800,
easing : 'easeInOutBack'
});
});
</script>
<script src="js/jquery.chili-2.2.js" type="text/javascript"></script>
<script src="js/chili/recipes.js" type="text/javascript"></script>

harbingerOTV
03-19-2011, 03:38 PM
I would start with only loading jQuery once. You are doing it three times.

Belen
03-21-2011, 10:23 AM
Thanks for your reply but I do not know Jquery and Im lost. Could you be more specific, please? I have tried moving around the code and getting rid off
<script type="text/javascript" src="js/jquery-1.3.1.min.js"></script> but without success.

This is the code I have now:

<link rel="stylesheet" type="text/css" href="css/jquery.lightbox-0.5.css" media="screen" />
<script type="text/javascript"src="js/jquery.js"></script>



<script type="text/javascript" src="js/jquery.lightbox-0.5.js"></script>

<script type="text/javascript" src="js/stepcarousel.js"></script>


<script type="text/javascript">
$(function() {
// Use this example, or...
$('#mygallery a').lightBox({fixedNavigation:true});
});


</script>

<script type="text/javascript" src="js/jquery-1.3.1.min.js"></script>
<script type="text/javascript" src="js/jquery.easing.1.3.js"></script>
<script type="text/javascript" src="js/jquery.ennui.contentslider.js"></script>

<script type="text/javascript">

stepcarousel.setup({
galleryid: 'mygallery', //id of carousel DIV
beltclass: 'belt', //class of inner "belt" DIV containing all the panel DIVs
panelclass: 'panel', //class of panel DIVs each holding content
/* autostep: {enable:true, moveby:1, pause:3000},
*/ panelbehavior: {speed:500, wraparound:true, wrapbehavior:'pushpull', persist:false},
defaultbuttons: {enable: true, moveby: 1, leftnav: ['images/leftnav.gif', -35, 50], rightnav: ['images/rightnav.gif', 10, 50]},
statusvars: ['statusA', 'statusB', 'statusC'], //register 3 variables that contain current panel (start), current panel (last), and total panels
contenttype: ['inline'] //content setting ['inline'] or ['ajax', 'path_to_external_file']
})

</script>



<script type="text/javascript">
$(function() {
$('#one').ContentSlider({
width : '920px',
height : '200px',
speed : 800,
easing : 'easeInOutBack'
});
});
</script>

Belen
03-21-2011, 01:07 PM
Ready. Found the solution. Now it works. Thanks



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum