我是一个初学者... 我已经使用了两个jquery(一个是JQuery的弹出 - “颜色框的种类ajax”和另一个是Jquery的加载更多选项,获取数据 - 再次Ajax)它是与Mootools冲突/冲突(对于日历功能)。 这里是我的长途区号..不能解决jquery和mootools冲突
<script type="text/javascript" src="cal/js/mootools-1.2.4-core.js"></script>
<script type="text/javascript" src="cal/js/mootools-1.2.4.4-more.js"></script>
<script type="text/javascript" src="cal/js/calendar-eightysix-v1.1.js"></script>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.0/jquery.min.js"></script>
<script src="javascripts/popup-jquery/jquery.popup.googleapis.js"></script>
<script src="javascripts/popup-jquery/jquery.colorbox.js"></script>
<script type="text/javascript">
jQuery.noConflict();
// For jQuery scripts
(function($){
$(document).ready(function(){
//Calling Pop-up
$(".example5").colorbox();
//Calling More Button
$('.more').live("click",function()
{
var ID = $(this).attr("id");
if(ID)
{
$("#more"+ID).html('<img src="load/moreajax.gif" />');
$.ajax({
type: "POST",
url: "load/ajax_more_calender_content.php",
data: "lastmsg="+ ID,
cache: false,
success: function(html){
$("div#updates").append(html);
$("#more"+ID).remove();
}
});
}
else
{
$(".morebox").html('The End');
}
return false;
});
});
})(jQuery);
(function($) {
window.addEvent('domready', function() {
//Example XIII
var calendarXIII = new CalendarEightysix('exampleXIII', { 'injectInsideTarget': true, 'alwaysShow': true,'draggable': true, 'pickable': true });
calendarXIII.addEvent('rendermonth', function(e) {
//The event returns all the date related elements within the calendar which can easily be iterated
e.elements.each(function(day) {
day.set('title', day.retrieve('date').format('%A %d %B'));
day.setStyles({ 'cursor': 'pointer' }).addEvent('click', function() { window.location='../calender.php?date='+day.retrieve('date').get('date')+'&month='+day.retrieve('date').get('month')+'&year='+day.retrieve('date').get('year'); });
});
});
calendarXIII.render(); //Render again because while initializing and doing the first render it did not have the event set yet
});
})(document.id);
</script>
我看了很多论坛,并在上面提到的方式实现它,工作代码仅是弹出并加载更多选项(jQuery的),而不是日历( mootools的)。 仍然代码不工作...任何帮助将非常明显... !!!! 感谢你
我记得我使用'$ .jQuery()'而不是'$()'来定义选择器,但是在做这件事之前你应该做一件事情,我现在不记得了,互联网。我认为这是最好的方法,我用MooTools进行了测试,没有发生任何冲突。 – MahanGM 2012-01-05 13:47:27
谢谢先生...但是,jquery是工作它的Mootools不工作.... 我试过你的建议,但同样的问题仍然Pan me我... – Akjethwani 2012-01-05 13:51:52
在我以前的作品中找到它。首先,我做了一个'jQuery.noConflict();'接下来我使用'jQuery('')'作为选择器。试试这个,并报告我! – MahanGM 2012-01-05 14:04:29