test
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • buzibuzi Friend
    #163672

    Hi, im trying to implement a javascript library to create a color transition effect when hovering over menu links.
    i can use either JQuery or Mootools.

    this is the function im using:

    $content .= "t" .'jQuery.noConflict();' ."n";
    $content .= "t" .'$(document).ready(function() {' ."n";
    $content .= "t" .'$('.mainlevel-fade').dwFadingLinks({' ."n";
    $content .= "t" .'color: '#008000',' ."n";
    $content .= "t" .'duration: 700' ."n";
    $content .= "t" .'});' ."n";
    $content .= "t" .'});' ."n";

    when using a JQuery function i get these errors in IE:

    Message: Object doesn’t support this property or method
    URI: dev/components/com_k2/js/k2.js

    Message: Object doesn’t support this property or method
    URI: /dev/media/system/js/mootools.js

    Message: Object doesn’t support this property or method
    URI: /dev/media/system/js/mootools.js

    is there a recommended library i should use to avoid conflicts with the Ja_portfolio template ?
    is there a “no conflict” mode ?

    Thanks

    Saguaros Moderator
    #390465

    to remove conflicting issue: between mootools with jquer, and between jquery with jquery:

    1) the mootools file must to load at first, then the jquery is loaded at second
    2) a page only has only one jquery file loaded, if the page loaded more than 2 jquery files => the jquery conflict will happen,
    3) you should put the following code at the nearest javascript file loading after the jquery file.
    <blockquote>
    jQuery.noConflict();</blockquote>
    4) do not use $ sign for jquery block code:

    for example with wrong:
    <blockquote>
    $content .= “t” .’jQuery.noConflict();’ .”n”;
    $content .= “t” .’$(document).ready(function() {‘ .”n”;
    $content .= “t” .’$(‘.mainlevel-fade’).dwFadingLinks({‘ .”n”;
    $content .= “t” .’color: ‘#008000′,’ .”n”;
    $content .= “t” .’duration: 700′ .”n”;
    $content .= “t” .’});’ .”n”;
    $content .= “t” .’});’ .”n”;
    </blockquote>

    must to replace by:

    $content .= “t” .’jQuery.noConflict();’ .”n”;
    $content .= “t” .’jQuery(document).ready(function($) {‘ .”n”;
    $content .= “t” .’$(‘.mainlevel-fade’).dwFadingLinks({‘ .”n”;
    $content .= “t” .’color: ‘#008000′,’ .”n”;
    $content .= “t” .’duration: 700′ .”n”;
    $content .= “t” .’});’ .”n”;
    $content .= “t” .’});’ .”n”;

    or :

    $content .= “t” .’jQuery.noConflict();’ .”n”;
    $content .= “t” .’jQuery(document).ready(function() {‘ .”n”;
    $content .= “t” .’jQuery(‘.mainlevel-fade’).dwFadingLinks({‘ .”n”;
    $content .= “t” .’color: ‘#008000′,’ .”n”;
    $content .= “t” .’duration: 700′ .”n”;
    $content .= “t” .’});’ .”n”;
    $content .= “t” .’});’ .”n”;

Viewing 2 posts - 1 through 2 (of 2 total)

This topic contains 2 replies, has 2 voices, and was last updated by  Saguaros 13 years, 7 months ago.

We moved to new unified forum. Please post all new support queries in our New Forum