Author Topic: Sidebar script  (Read 7183 times)

0 Members and 1 Guest are viewing this topic.

Offline
*
Sidebar script
« on: February 11, 2016, 04:14:00 AM »
Just installed CWP and find one trouble. When I click on tab with submenu it starts loading all page via ajax instead just opening submenu.
Here is a fix. Just remove ajax call in this method(main.js:149). It does nothing.
 Interface will work faster:
Code: [Select]
//click magic
mainNavLink.click(function(event) {
$this = $(this);
if($this.hasClass('hasUl')) {
var menuIndexNo= $(this).parents("li").index();
var menuAction = 0;
event.preventDefault();
if($this.hasClass('drop')) {
menuAction = 0;
$(this).siblings('ul.sub').slideUp(250).siblings().toggleClass('drop');
} else {
menuAction = 1;
$(this).siblings('ul.sub').slideDown(250).siblings().toggleClass('drop');
}

/**REMOVE THIS. It does nothing! **/
// Start :- Ajax Section
$.ajax({
type: "POST",
url: "#",
data: { menuIndexNo: menuIndexNo, menuAction: menuAction }
}).done(function( data ) {
//alert(data);
});
// End :- Ajax Section
/** ---- **/
}
});

« Last Edit: February 11, 2016, 04:18:24 AM by consigliere.kz »