Forum Replies Created
-
AuthorPosts
-
Hi Yigit,
I found the file and tried that, as well as transplanting my additional code into the newer script (I think some of the class references have changed).
It seems that $(‘.main_menu’).css({top: topH + ‘px’}) is never applied to the navigationc container class main_menu. I can see the dynamic sizing applied to the header div, but not on the main_menu class.Is there anything glaring in the code that would cause this? I adapted this script YEARS ago now.
Many thanks!
Hi guys, sorry for the long wait for a reply. The client has been back on to me, and I have been playing around rebuilding the child theme on my localhost.
Unfortunately due to terrible compatability from Namesco, I cannot load it onto a demo server.
Everything is working bar the header. It turns out I had modified the AVIA.JS file for the child theme, but I’m NOT a coder, and I’m struggling to see how I can implement this in the current version. Please see below for the code I used in the child…/* Navigation mods to lower links in header. Follwing function needs to replace existing function in AVIA.JS */ function avia_header_size() { var win = $(window), header = $('.fixed_header #header'), //logo = header.find('.logo img'), logo = $('#header_main .container .logo img, #header_main .container .logo a'), elements = $('#header_main .container, .main_menu ul:first-child > li > a:not(.avia_mega_div a)'), el_height = $(elements).filter(':first').height(), // START Reposition Menu - find height of .main_menu top_height = $('.main_menu').height(), // END Reposition Menu isMobile = 'ontouchstart' in document.documentElement, scroll_top = $('#scroll-top-link'), set_height = function() { // START Reposition Menu - include new variable topH var st = win.scrollTop(), newH = 0, topH = 0; // END Reposition Menu if(st < el_height/2) { newH = el_height - st; // START Reposition Menu - Set topH at max topH = 175 - st; // END Reposition Menu header.removeClass('header-scrolled'); } else { newH = el_height/2; // START Reposition Menu - Set topH at min topH = 75; // END Reposition Menu header.addClass('header-scrolled'); } elements.css({'height': newH + 'px', 'lineHeight': newH + 'px'}); logo.css({'maxHeight': newH + 'px'}); // START Reposition Menu - Assign topH to the CSS class $('.main_menu').css({top: topH + 'px'}); // END Reposition Menu } if(!header.length) return false; if(isMobile) { return false; } win.scroll(set_height); set_height(); }
How could this be achieved in the current skin? Many thanks!
Hi Yigit,
Thanks for the reply. Do you guys know if a more streamlined way than backing up the entire site, downloading and then uploading to a different server and going through the wordpress setup again?I have been out of the loop for quite a while, there must be an easier way to move a wordpress site.
Perfect Rikard, thanks!
-
AuthorPosts