Go Back   CodingForums.com > :: Client side development > JavaScript programming > JavaScript frameworks

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 09-12-2010, 12:49 PM   PM User | #1
mshack
New Coder

 
Join Date: Sep 2010
Posts: 16
Thanks: 1
Thanked 0 Times in 0 Posts
mshack is an unknown quantity at this point
Jquery conflict need some help

I have to scripts embedded into my site.

Independently they both work fine, but when I use them both, only one will work. I am a noob to coding and would appreciate some advanced help.

Here are the 2 scripts i put in my html

<script type="text/javascript" language="javascript" src="http://nitrografixx.com/accodion_menu/jquery.min.js"></script>
<script src="http://nitrografixx.com/accodion_menu/jquery-ui-1.8.4.custom.min.js" type="text/javascript"></script>
<script type="text/javascript" language="javascript" src="http://nitrografixx.com/accodion_menu/script.js"></script>


<script type="text/javascript">
jQuery.noConflict();

jQuery(function() {
jQuery("#tabs").tabs({ fx: { opacity: 'toggle' } });
});
jQuery(document).ready(function () {
jQuery('.infiniteCarousel').infiniteCarousel();
});
jQuery(function() {
jQuery("#accordion").accordion({ autoHeight: false });
});
jQuery(document).ready(function() {
jQuery(".various").fancybox({
'titleShow' : false
});
});
</script>




<script type="text/javascript" src="http://nitrografixx.com/templates/article_slide_js/jquery.min.js"></script>

<script type="text/javascript" src="http://nitrografixx.com/templates/article_slide_js/jquery.easing.1.3.min.js"></script>
<script type="text/javascript" src="http://nitrografixx.com/templates/article_slide_js/jquery.DDSlider.js"></script>


<!-- START ARTICLE SLIDE -->

<script type="text/javascript">

//triggers the slider
$(document).ready(function() {

$('#yourSliderId').DDSlider({

nextSlide: '.slider_arrow_right',
prevSlide: '.slider_arrow_left',
selector: '.slider_selector'

});

});

</script>

Last edited by mshack; 09-12-2010 at 11:32 PM..
mshack is offline   Reply With Quote
Old 09-12-2010, 11:36 PM   PM User | #2
mshack
New Coder

 
Join Date: Sep 2010
Posts: 16
Thanks: 1
Thanked 0 Times in 0 Posts
mshack is an unknown quantity at this point
i can paypal $10 for someone to get this fixed for me

I hate coding, but most of us graphics guys do, lol.
mshack is offline   Reply With Quote
Old 09-13-2010, 11:18 AM   PM User | #3
SB65
Senior Coder

 
Join Date: Feb 2009
Location: West Yorkshire
Posts: 2,827
Thanks: 9
Thanked 685 Times in 679 Posts
SB65 will become famous soon enoughSB65 will become famous soon enough
It looks like you have jquery loaded more than once - highlighted in red below:

Code:
<script type="text/javascript" language="javascript" src="http://nitrografixx.com/accodion_menu/jquery.min.js"></script>
<script src="http://nitrografixx.com/accodion_menu/jquery-ui-1.8.4.custom.min.js" type="text/javascript"></script>
<script type="text/javascript" language="javascript" src="http://nitrografixx.com/accodion_menu/script.js"></script>


<script type="text/javascript">
jQuery.noConflict();

jQuery(function() {
jQuery("#tabs").tabs({ fx: { opacity: 'toggle' } });
});
jQuery(document).ready(function () {
jQuery('.infiniteCarousel').infiniteCarousel();
});
jQuery(function() {
jQuery("#accordion").accordion({ autoHeight: false });
});
jQuery(document).ready(function() {
jQuery(".various").fancybox({
'titleShow' : false
});
});
</script>



<script type="text/javascript" src="http://nitrografixx.com/templates/article_slide_js/jquery.min.js"></script>

<script type="text/javascript" src="http://nitrografixx.com/templates/article_slide_js/jquery.easing.1.3.min.js"></script>
<script type="text/javascript" src="http://nitrografixx.com/templates/article_slide_js/jquery.DDSlider.js"></script>


<!-- START ARTICLE SLIDE -->

<script type="text/javascript">

//triggers the slider
$(document).ready(function() {

$('#yourSliderId').DDSlider({

nextSlide: '.slider_arrow_right',
prevSlide: '.slider_arrow_left',
selector: '.slider_selector'

});

});

</script>
Take the second one out and give that a try.
SB65 is offline   Reply With Quote
Old 09-13-2010, 01:18 PM   PM User | #4
mshack
New Coder

 
Join Date: Sep 2010
Posts: 16
Thanks: 1
Thanked 0 Times in 0 Posts
mshack is an unknown quantity at this point
that works.........but only if i have them both in the same html sheet

I have them in separate tabs , so if i remove the jquery.min.js when i separate them, then only one works again.

Any idea on how to get them both to function when in different tab content
mshack is offline   Reply With Quote
Old 09-13-2010, 01:24 PM   PM User | #5
SB65
Senior Coder

 
Join Date: Feb 2009
Location: West Yorkshire
Posts: 2,827
Thanks: 9
Thanked 685 Times in 679 Posts
SB65 will become famous soon enoughSB65 will become famous soon enough
Not sure I quite understand your situation - are you saying that in some cases you have both effects loaded on a single html page, and in other cases only one?
SB65 is offline   Reply With Quote
Old 09-13-2010, 04:21 PM   PM User | #6
mshack
New Coder

 
Join Date: Sep 2010
Posts: 16
Thanks: 1
Thanked 0 Times in 0 Posts
mshack is an unknown quantity at this point
here is a test of the two scripts

http://www.nitrografixx.com/111.htm



If i put the article slider first in the html, then both run fine , if i put the accordion menu first, only one will work.

I remove the min.js from the 2nd script in each instance, only leaving it in the first one.

I want the menu on the left side, but for some reason both will not run when i do so.

Last edited by mshack; 09-13-2010 at 05:06 PM..
mshack is offline   Reply With Quote
Old 09-13-2010, 05:20 PM   PM User | #7
SB65
Senior Coder

 
Join Date: Feb 2009
Location: West Yorkshire
Posts: 2,827
Thanks: 9
Thanked 685 Times in 679 Posts
SB65 will become famous soon enoughSB65 will become famous soon enough
I think the problem is the code in red below:

Code:
<script type="text/javascript">
    jQuery.noConflict();

    jQuery(function() {
        jQuery("#tabs").tabs({ fx: { opacity: 'toggle' } });
    });
    jQuery(document).ready(function () {
         jQuery('.infiniteCarousel').infiniteCarousel();
    });
    jQuery(function() {
        jQuery("#accordion").accordion({ autoHeight: false });
    });
    jQuery(document).ready(function() {
        jQuery(".various").fancybox({
            'titleShow'        : false
        });
    });
</script>
I think you've changed the code linked from your last post in the last half hour or so - but with your original code I removed one of the jquery loads and the red highlighted text and all is well, with the menu on the left. You don't have .various classes on the page anyway, but I think the page may be falling over the fancybook method.

With your amended html ordering (menu on right), this bit of code comes last and thus has no effect, which is why this also fixes things.
SB65 is offline   Reply With Quote
Old 09-13-2010, 06:18 PM   PM User | #8
mshack
New Coder

 
Join Date: Sep 2010
Posts: 16
Thanks: 1
Thanked 0 Times in 0 Posts
mshack is an unknown quantity at this point
thank you very much, that was the issue

working perfectly now
http://www25.myfantasyleague.com/2010/home/47873#0
mshack is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

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

Forum Jump


All times are GMT +1. The time now is 06:19 AM.


Advertisement
Log in to turn off these ads.