Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • rahulxx Friend
    #167150

    my template mega menu always conflict with other java script
    i am tring to put mega menu code inside jQuery.noConflict, but it seems that it is not working
    please take a look at my code which i want inside jQuery.noConflict
    please fix it:-*

    [PHP]<script type=”text/javascript”>

    //<!, items_h = [];

    $$(‘div.submenu’).each(function (el) {
    if (el.getParent().getParent().hasClass(‘level-<?php echo $sublevel ?>’)) {
    items_v.push(el);
    } else {
    items_h.push(el);
    }
    });

    new SPMenu(items_v, {
    direction: ‘<?php echo strtoupper($this->getDirection()) ?>’,
    bound: limits,
    fxOptions: {
    transition: Fx.Transitions.<?php echo $this->getParam(‘menu_transition’,’Sine.easeOut’) ?>,
    duration: <?php echo $this->getParam(‘menu_duration’,400) ?>
    },
    animation: ‘<?php echo $this->getParam(‘menu_animation’,’slide’) ?>’,
    mode: ‘vertical’,
    offset:{x:<?php echo $this->getParam(‘init_x’,0) ?>, y: <?php echo $this->getParam(‘init_y’,0) ?>}
    });

    new Menu(items_h, {
    direction: ‘<?php echo strtoupper($this->getDirection()) ?>’,
    bound: limits,
    fxOptions: {
    transition: Fx.Transitions.<?php echo $this->getParam(‘menu_transition’,’Sine.easeOut’) ?>,
    duration: <?php echo $this->getParam(‘menu_duration’,400) ?>
    },
    animation: ‘<?php echo $this->getParam(‘menu_animation’,’slide’) ?>’,
    mode: ‘horizontal’,
    offset: {x: <?php echo $this->getParam(‘sub_x’,0) ?>, y: <?php echo $this->getParam(‘sub_y’,0) ?>}
    });
    });
    //]]>
    </script>[/PHP]

    chavan Friend
    #405138

    Hi rahulxx

    There is a lot resource to solve the problem of conflict between js framework. You can fix via following some articles/posts:
    http://docs.jquery.com/Using_jQuery_with_Other_Libraries
    http://www.mooforum.net/solutions12/using-jquery-and-mootools-the-same-page-t1039.html
    http://stackoverflow.com/questions/2810399/jquery-and-mootools-conflict

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

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

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