Не нравятся результаты поиска? Попробуйте другой поиск!
DLE FAQ » Все вопросы » Общие вопросы » Конфликт скриптов

Конфликт скриптов


     24.05.2013    скрипт, javascript, loadcontent    Общие вопросы, jQuery    3165

вопрос
Суть такая, на сайте 2 javascript модуля, но как один загружается, он убивает второй

Как их подружить?

Скрипт, который подгружает новости на лету:
<script type="text/javascript">
function LoadContent() {
        patch = window.location.toString();
       if (patch!== undefined && patch=="http://i-sc.ru/" || patch=="http://i-sc.ru/index.php") {
        $.ajax({
        url: patch,
        success: function(content) {
    $('#dle-content').html($('#dle-content', content).html());
    }})}
    
    setTimeout("LoadContent()", 50);
    }
    
    </script>
    
      <script type="text/javascript">
      $(document).ready(function(){
LoadContent()

});
      </script>


и скрипт fancyzoom
<script type="text/javascript" src="js/jquery.fancyzoom.js"></script>
   <script type="text/javascript">
$(function() {
  //Set the default directory to find the images needed
  //by the plugin (closebtn.png, blank.gif, loading images ....)
  $.fn.fancyzoom.defaultsOptions.imgDir='../images/'; //very important must finish with a /

  $('a.tozoom').fancyzoom({Speed:0});

  $('a').fancyzoom({overlay:0.6});

  //new rev > 1.2
  //apply fancyzoom effect on all image whose class is fancyzoom !!
  
  $('img.fancyzoom').fancyzoom();
});
</script>


вот как раз fancyzoom помирает

Ответа пока нет


Чтобы комментировать - войдите или зарегистрируйтесь на сайте

Похожие вопросы

наверх