3

I am a newbie and I am designing a website. I dont know about jQuery. My problem is:

  1. I am using a script that uses jQuery.1.7.min.js for a sliding banner images with description.
  2. Also, i am using another script to show latest events on the same page which uses jQuery.1.8.3.js

What happens is:

  1. when i put both jQuery files no script works.
  2. if i use 1.7, only (1) works
  3. if i use 1.8.3 the banner disappears and only (2) works.

what can i do?

Code:

<div class="flexslider-quote">
    <ul class="slides">
        <li>
            <div class="date"><strong>29</strong><span> May, 2012</span>
            </div>
            <p><a href="#" class="link">test 1</p> </li> <li> <div class="date"><strong>21</strong><span> May, 2012</span></div> <p><a href="#" class="link">test 2</p> </li> </ul> </div> 
<script type="text/javascript" src="js/vendor/jquery-1.8.3.min.js"></script>

Second:

<script src="js/jquery-1.7.min.js"></script>
<script>
    $(document).ready(function() {
        $('.slider')._TMS({
            settings
        })
    });
</script>
<div id="slide">
    <div class="slider">
        <cms:show_repeatable 'banner_repeatable_images'>
            <ul class="items">
                <li>bannerimage
                    <div class="banner">
                        <p class="text-1">banner title</p>
                        <p class="text-2">banner text</p>
                    </div>
                </li>
            </ul>
    </div>
</div>
9
  • 2
    Just inlcude this link to your page <script src="http://code.jquery.com/jquery-latest.js"></script> Commented Jan 2, 2014 at 10:56
  • 1
    Probably the old script use deprecated function/api's try use the latest version of the scripts. If you can provide a demo on jsfiddle, provide your code and reference the scripts you are using Commented Jan 2, 2014 at 11:06
  • @laaposto I don't see how it's going to solve his problem. Commented Jan 2, 2014 at 11:09
  • Use Jquery noConflict() Commented Jan 2, 2014 at 11:15
  • @IrvinDomininakaEdward how can i place the code here? coz its too big to fir in Commented Jan 2, 2014 at 11:16

2 Answers 2

3

You provided not much elements to investigate, but with some google searches I think that your plugins are:

  1. TM_slider --> http://mydummysite.com.au/qnpx/documentation/JustSlider/
  2. flexSlider --> http://www.woothemes.com/flexslider/

I have combined them both in the fiddle with jQuery 1.9.2 and it's "working fine". Probably your problem is somewhere else.

Eventually you can give a try to jQuery migrate:

This plugin can be used to detect and restore APIs or features that have been deprecated in jQuery and removed as of version 1.9. See the warnings page for more information regarding messages the plugin generates. For more information about the changes made in jQuery 1.9, see the upgrade guide and blog post.

Ref: https://github.com/jquery/jquery-migrate/#readme

Code:

$(document).ready(function () {

    $('.slider')._TMS({
        show: 0,
        pauseOnHover: false,
        prevBu: '.prev',
        nextBu: '.next',
        playBu: '.play',
        pagNums: false,
        slideshow: 7000
    })

    jQuery('.flexslider-quote').flexslider({
        animation: 'slide',
        slideshow: true,
        pauseOnHover: true,
        smoothHeight: true,
        prevText: "",
        nextText: ""
    })

});

Demo: http://jsfiddle.net/IrvinDominin/J6Bq2/

Sign up to request clarification or add additional context in comments.

Comments

2

In order to use a few versions of jQuery, you need to use jQuery.noConflict().

Please, read the official documentation: http://api.jquery.com/jquery.noconflict/.

Also read my answer to the similar question here: jQuery noConflict() problem

Hope, that will help.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.