English 中文(简体)
Jquery冲突
原标题:Jquery conflict
  • 时间:2011-09-15 20:58:12
  •  标签:
  • jquery

我在这里说是新的,我有一个大问题,我可以不解决。

我有两条文字,相互不合作。

这里的法典

<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></script>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.5.3/jquery-ui.min.js" ></script>


<script type="text/javascript">
$(document).ready(function(){
$("#featured > ul").tabs({fx:{opacity: "toggle"}}).tabs("rotate", 0, true);
});
</script>
    <script type="text/javascript" src="js/jquery-1.4.2.min.js"></script>

<script type="text/javascript" src="js/jquery.skripta_1.min.js"></script>
<script type="text/javascript">
    $(document).ready(function(){
        $( #slider1 ).skripta_1();  
    });
</script>

现在,如果将这一法典列入这一部分,

<script type="text/javascript">
    $(document).ready(function(){
        $("#featured > ul").tabs({fx:{opacity: "toggle"}}).tabs("rotate", 0, true);
    });
</script>

工作

但是,当我去掉这一部分时,我就删除了这一部分。

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

上述第一部分的确是行之有效的,但其中一部分是有效的。

<script type="text/javascript" src="js/jquery.skripta_1.min.js"></script>
    <script type="text/javascript">
        $(document).ready(function(){
            $( #slider1 ).skripta_1();  
        });
    </script>

我已经尝试过任何涉及无冲突或重新命名的“<> > > 和“j Query”的任何事情,但没有任何帮助。

问题回答

You re loading mini s of jQuery 1.3.2 and 1.4.2. Just load 1.4.2.

So, to give you more code, it looks like th是

页: 1

<script type="text/javascript" src="http://ajax.googleap是.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
<script type="text/javascript" src="http://ajax.googleap是.com/ajax/libs/jqueryui/1.5.3/jquery-ui.min.js" ></script>


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

    <script type="text/javascript">
        $(document).ready(function(){
            $( #slider1 ).tinycarousel();   
        });
    </script>
<script type="text/javascript">
    $(document).ready(function(){
        $("#featured > ul").tabs({fx:{opacity: "toggle"}}).tabs("rotate", 0, true);
    });
</script>

页: 1

<script type="text/javascript">
        $(document).ready(function(){
            $("#featured > ul").tabs({fx:{opacity: "toggle"}}).tabs("rotate", 0, true);
        });
    </script>

<div id="featured" >
  <ul class="ui-tabs-nav">

<li class="ui-tabs-nav-item ui-tabs-selected" id="nav-fragment-1">
            <a href="#fragment-1"><span>
             <div id="movie_thumb"><img src="image.png" width="80" height="60" border="0" /></div>
              </span></a>
        </li>

    <li class="ui-tabs-nav-item" id="nav-fragment-2">
              <a href="#fragment-2"><span>
      <div id="movie_thumb"><img src="image2.png" width="80" height="60" border="0" /></div>
              </span></a>
        </li>

             <li class="ui-tabs-nav-item" id="nav-fragment-3">
              <a href="#fragment-3"><span>
                <div id="movie_thumb"><img src="image3.png" width="80" height="60" border="0" /></div>
                             </span></a>
        </li>

             <li class="ui-tabs-nav-item" id="nav-fragment-4">
              <a href="#fragment-4"><span>
            <div id="movie_thumb"><img src="image4.png" width="80" height="60" border="0" /></div>
              </span></a>
            </li>

             <li class="ui-tabs-nav-item" id="nav-fragment-5">
              <a href="#fragment-5"><span>
              <div id="movie_thumb"><img src="image5.png" width="80" height="60" border="0" /></div>
              </span></a>
            </li>

      </ul>

页: 1

<script type="text/javascript">
            $(document).ready(function(){
                $( #slider1 ).tinycarousel();   
            });
        </script>

<div id="slider1">
   <ul class="onemo">
      <li> MANY THINGS GO HERE</li>
      <li> MANY THINGS GO HERE</li>
      <li> MANY THINGS GO HERE</li>
      <li> MANY THINGS GO HERE</li>
   </ul>
</div>

does th是 maybe help?

事实上,这是我所描述的。

这是法典。

<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.4/jquery.min.js"></script>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.5.3/jquery-ui.min.js" ></script>
<script type="text/javascript" src="../js/jquery.tinycarousel.min.js"></script>

冲突一方是

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

<script>
    (function ($) {
        $( #slider1 ).tinycarousel();
        $("#featured > ul").tabs({
            fx: {
                opacity: "toggle"
            }
        }).tabs("rotate", 0, true);
    })(jQuery);
</script>

when removed the part

$( #slider1 ).tinycarousel();

doesn t work, and without removing it the part

$("#featured > ul").tabs({fx:{opacity: "toggle"}}).tabs("rotate", 0, true);

doesn t work,but the first one does





相关问题
getGridParam is not a function

The HTML: <a href="javascript:void(0)" id="m1">Get Selected id s</a> The Function: jQuery("#m1").click( function() { var s; s = jQuery("#list4").getGridParam( selarrrow )...

selected text in iframe

How to get a selected text inside a iframe. I my page i m having a iframe which is editable true. So how can i get the selected text in that iframe.

jQuery cycle page with links

I am using the cycle plugin with pager functionality like this : $j( #homebox ) .cycle({ fx: fade , speed: fast , timeout: 9000, pager: #home-thumbs , ...

jquery ui dialog opens only once

I have a button that opens a dialog when clicked. The dialog displays a div that was hidden After I close the dialog by clicking the X icon, the dialog can t be opened again.

jConfirm with this existing code

I need help to use jConfirm with this existing code (php & Jquery & jAlert). function logout() { if (confirm("Do you really want to logout?")) window.location.href = "logout.php"; } ...

Wrap text after particular symbol with jQuery

What I m trying to do, is wrap text into div inside ll tag. It wouldn t be a problem, but I need to wrap text that appears particularly after "-" (minus) including "minus" itself. This is my html: &...

热门标签