좋아, 내가 jQuery를이 jQuery를 스크립트의 상단에이를 추가하여 하나의 스크립트 Mootools의 함께 가야 :jQuery를하고 Mootools의 충돌
var $j = jQuery.noConflict();
후 모든 교체 :
$(
을
$j(
하지만 어떻게 당신이 얻을 것이다 Mootools의와
는 jQuery를 사용하는 다음 스크립트를 좋아하는? 모든 입력에 미리
감사합니다,
트레이시
//Fade In Content Viewer: By JavaScript Kit: http://www.javascriptkit.com
var fadecontentviewer={
csszindex: 100,
fade:function($allcontents, togglerid, selected, speed){
var selected=parseInt(selected)
var $togglerdiv=$("#"+togglerid)
var $target=$allcontents.eq(selected)
if ($target.length==0){ //if no content exists at this index position (ie: stemming from redundant pagination link)
alert("No content exists at page number "+selected+"!")
return
}
if ($togglerdiv.attr('lastselected')==null || parseInt($togglerdiv.attr('lastselected'))!=selected){
var $toc=$("#"+togglerid+" .toc")
var $selectedlink=$toc.eq(selected)
$("#"+togglerid+" .next").attr('nextpage', (selected<$allcontents.length-1)? selected+1+'pg' : 0+'pg')
$("#"+togglerid+" .prev").attr('previouspage', (selected==0)? $allcontents.length-1+'pg' : selected-1+'pg')
$target.css({zIndex: this.csszindex++, visibility: 'visible'})
$target.hide()
$target.fadeIn(speed)
$toc.removeClass('selected')
$selectedlink.addClass('selected')
$togglerdiv.attr('lastselected', selected+'pg')
}
},
setuptoggler:function($allcontents, togglerid, speed){
var $toc=$("#"+togglerid+" .toc")
$toc.each(function(index){
$(this).attr('pagenumber', index+'pg')
})
var $next=$("#"+togglerid+" .next")
var $prev=$("#"+togglerid+" .prev")
$next.click(function(){
fadecontentviewer.fade($allcontents, togglerid, $(this).attr('nextpage'), speed)
return false
})
$prev.click(function(){
fadecontentviewer.fade($allcontents, togglerid, $(this).attr('previouspage'), speed)
return false
})
$toc.click(function(){
fadecontentviewer.fade($allcontents, togglerid, $(this).attr('pagenumber'), speed)
return false
})
},
init:function(fadeid, contentclass, togglerid, selected, speed){
$(document).ready(function(){
var faderheight=$("#"+fadeid).height()
var $fadecontents=$("#"+fadeid+" ."+contentclass)
$fadecontents.css({top: 0, left: 0, height: faderheight, visibility: 'hidden'})
fadecontentviewer.setuptoggler($fadecontents, togglerid, speed)
setTimeout(function(){fadecontentviewer.fade($fadecontents, togglerid, selected, speed)}, 100)
$(window).bind('unload', function(){ //clean up
$("#"+togglerid+" .toc").unbind('click')
$("#"+togglerid+" .next", "#"+togglerid+" .prev").unbind('click')
})
})
}
}
'$ ('. $ j ('. –
) $를 모두 $처럼 설정하지 않아서 작동하지 않습니다. (그래서 "j "두 개 사이에 있습니다 : 일부는 $ toc $ target $ selectedlink.ect ... 달러 기호/여는 괄호 대신 달러 기호/이름이 있습니다."j "를 거기에 붙이면 실제로 나사못이 생깁니 다. – flipflopmedia
Dimitar Christoff의 대답이 없으면이 기능이 작동하지 않았을 것입니다. 왜냐하면 관계없이 무시하는 것이기 때문입니다. MooTools : 1 개의 MooTools 스크립트로 2 개의 jQuery 스크립트를 즐겁게 사용할 수있는 유일한 방법은 모든 3 개의 스크립트에서 $를 재 할당하는 것입니다! – flipflopmedia