jquery - How to get two javascripts to work on one page -


this has been has baffled me longest working javscript. first there 2 javascript codes i'm using.

here first 1

  <!-- javascript -->     <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>       <script type="text/javascript" src="jquery.easing.1.3.js"></script>     <script type="text/javascript">         $(function() {             $('ul.nav a').bind('click',function(event){                 var $anchor = $(this);                  $('html, body').stop().animate({                     scrolltop: $($anchor.attr('href')).offset().top                 }, 1500,'easeinoutexpo');                 /*                 if don't want use easing effects:                 $('html, body').stop().animate({                     scrolltop: $($anchor.attr('href')).offset().top                 }, 1000);                 */                 event.preventdefault();             });         });     </script> 

the above code used make page transition 1 div smoothly. ---> http://tympanus.net/tutorials/websitescrolling/index_vertical.html

here second one

<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script> <script type="text/javascript" src="http://littleladyenterprises.com/wp-content/themes/blackchic/websitescrolling/css/jquery.sudoslider.min.js"></script> <script type="text/javascript">     $(document).ready(function(){         var sudoslider = $("#slider").sudoslider({             numeric: false,             continuous:true         });  var sudoslider2 = $("#slider2").sudoslider(); });  </script> 

this code slider

ok, placing slider script last works makes fisrt script, page transition script not work. have seen many different scripts, not js saavy, can tell me how make them both work on 1 page.

get rid of second call jquery library:

<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script> 

what happening overwriting first instance of jquery, causing bindings configured lost (i.e. first script)


Comments

Popular posts from this blog

linux - xterm copying to CLIPBOARD using copy-selection causes automatic updating of CLIPBOARD upon mouse selection -

c++ - qgraphicsview horizontal scrolling always has a vertical delta -