Ленча,
Тут весь вопрос в том, откуда и когда вызывается на исполнение метод jQuery accordeonmenuck - именно при исполнении этого метода и присваиваются классы, после чего меню можно передергивать. В приведенном вами скрипте есть только описание метода, но нет вызова на исполнение. |
Вызов на исполнение я нашла. Он идет вперемежку с переменными php и выглядит так
$document->addScript(JURI::base(true) . '/modules/mod_accordeonck/assets/jquery.easing.1.3.js');
$js = "
jQuery(document).ready(function(){
jQuery('#" . $menuID . "').accordeonmenuck({"
. "fadetransition : " . $fadetransition . ","
. "eventtype : '" . $eventtype . "',"
. "transition : '" . $mootransition . "',"
. "menuID : '" . $menuID . "',"
. "imageplus : '" . JURI::base(true) . '/' . $imageplus . "',"
. "imageminus : '" . JURI::base(true) . '/' . $imageminus . "',"
. "defaultopenedid : '" . $params->get('defaultopenedid') . "',"
. "activeeffect : '" . (bool) $params->get('activeeffect') . "',"
. "duree : " . $mooduration
. "});
}); ";
$document->addScriptDeclaration($js);
Но добавление данной функции после него все равно не работает. даже если я тупо вставляю ее в самый низ страницы, перед закрывающим body - не пашет. Мои идеи кончились. Завтра с утра на свежую голову буду думать. |
Ленча,
в конец 14 строки добавить |
не хочет :-E У меня уже истерика начинается... все, нунафиг, нунафиг... завтра
|
Ленча,
пост №9 строки 116 и 117 перенести в строку 28 |
вставила следующее
//alert('ok');
var act = $('.level1.open');
//alert(act);
act.prependTo(act.parent());
если убрать слеши - первый ок выводится alert(act) выдает [object Object] меню по-прежнему не сортируется По-моему, надо куда-то в этот кусок добавлять
function accordeonmenuInit() {
$(".parent.active.separator > a").addClass('test');
$(".parent > ul", menu).hide();
if (opts.showactive && !opts.activeeffect) {
$(".parent.active > ul", menu).show().parent().addClass("open");
$(".parent.active > img.toggler", menu).attr('src', opts.imageminus);
} else if (opts.showactive && opts.activeeffect) {
togglemenu($(".parent.active > .toggler, .parent.active.separator > a", menu));
}
if (opts.defaultopenedid && !$(".active.parent", menu).length) {
$(".item-"+opts.defaultopenedid+" > ul", menu).show().parent().addClass("open");
$(".item-"+opts.defaultopenedid+" > img.toggler", menu).attr('src', opts.imageminus);
}
if (opts.eventtype == 'click') {
$("li.parent > .toggler, li.parent.separator > a", menu).click(function() {
togglemenu($(this));
});
} else {
$("li.parent > .toggler", menu).mouseenter(function() {
togglemenu($(this));
});
}
открыли и перемеcтили... У меня пока не получается. Пробовала так
function accordeonmenuInit() {
$(".parent.active.separator > a").addClass('test');
$(".parent > ul", menu).hide();
if (opts.showactive && !opts.activeeffect) {
$(".parent.active > ul", menu).show().parent().addClass("open");
var act = $('.level1.open');
act.prependTo(act.parent());
$(".parent.active > img.toggler", menu).attr('src', opts.imageminus);
} else if (opts.showactive && opts.activeeffect) {
togglemenu($(".parent.active > .toggler, .parent.active.separator > a", menu));
}
if (opts.defaultopenedid && !$(".active.parent", menu).length) {
$(".item-"+opts.defaultopenedid+" > ul", menu).show().parent().addClass("open");
var act = $('.level1.open');
act.prependTo(act.parent());
$(".item-"+opts.defaultopenedid+" > img.toggler", menu).attr('src', opts.imageminus);
}
if (opts.eventtype == 'click') {
$("li.parent > .toggler, li.parent.separator > a", menu).click(function() {
togglemenu($(this));
});
} else {
$("li.parent > .toggler", menu).mouseenter(function() {
togglemenu($(this));
});
}
|
| Часовой пояс GMT +3, время: 02:00. |