Sunday 8th November 2009

by Sajith M.R

If you are using mootool and jquery same time in your html pages, it normally won’t work. Because both are using $ variable for the base object. So only the last js file included will be active.

jquery-mootools

To avoid this, follow the steps:

Include mootool js first
Include jquery js file second

Like this:

<script src=”javascript/mootools-release-1.11.js” type=”text/javascript”></script>
<script src=”javascript/jquery-1.3.2.min.js” type=”text/javascript”></script>

Then type:

<script>
jQuery.noConflict();
</script>

For mootool functions, continue with $ object and jQuery function , user jQuery object

For example , instead of $(“#div”), user jQuery(“#div”), another example is jQuery(“.common”).load(‘myfile.php’)

Enjoy Coding !!!

– Sajith

Tags: , , , ,

· · · ◊ ◊ ◊ · · ·

Leave a Reply

وظائف 2011 تحويل العملات برامج برنامج تسريع التحميل برنامج الفلاش برنامج محول الصوتيات عربي hotel 2011 زيادة رواتب العساكر 1431